3645 {
3646 Zone* zone = flow_graph->zone();
3648 bool negated = false;
3650 comparison()->AsStrictCompare(), &negated,
true);
3652 return this;
3653 }
3655 if ((comp == nullptr) || comp->CanDeoptimize() ||
3656 comp->HasUnmatchedInputRepresentations()) {
3657 return this;
3658 }
3659
3660
3661
3662 Value* use = comp->input_use_list();
3663 if ((use->instruction() == this) && comp->HasOnlyUse(use)) {
3664 if (negated) {
3665 comp->NegateComparison();
3666 }
3668 flow_graph->CopyDeoptTarget(this, comp);
3669
3670
3671 comp->RemoveEnvironment();
3672
3673 comp->RemoveFromGraph();
3675 if (FLAG_trace_optimization && flow_graph->should_print()) {
3676 THR_Print(
"Merging comparison v%" Pd "\n", comp->ssa_temp_index());
3677 }
3678
3679
3680 ASSERT(comp->input_use_list() ==
nullptr);
3681 comp->ClearSSATempIndex();
3682 comp->ClearTempIndex();
3683 }
3684
3685 return this;
3686 }
3687
3690 BinarySmiOpInstr* bit_and = nullptr;
3691 bool negate = false;
3693 &negate)) {
3696 &negate)) {
3698 }
3699 if (bit_and != nullptr) {
3700 if (FLAG_trace_optimization && flow_graph->should_print()) {
3701 THR_Print(
"Merging test smi v%" Pd "\n", bit_and->ssa_temp_index());
3702 }
3703 TestSmiInstr*
test =
new TestSmiInstr(
3707 bit_and->
left()->Copy(zone), bit_and->
right()->Copy(zone));
3710 flow_graph->CopyDeoptTarget(this, bit_and);
3712 bit_and->RemoveFromGraph();
3713 }
3714 }
3715 return this;
3716}
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
void SetComparison(ComparisonInstr *comp)
bool CanDeoptimize() const
friend class ComparisonInstr
InstructionSource source() const
static Token::Kind NegateComparison(Token::Kind op)
Definition * definition() const
#define THR_Print(format,...)
static Definition * CanonicalizeStrictCompare(StrictCompareInstr *compare, bool *negated, bool is_branch)
static bool RecognizeTestPattern(Value *left, Value *right, bool *negate)