3654 {
3655 Zone* zone = flow_graph->zone();
3657 bool negated = false;
3659 comparison()->AsStrictCompare(), &negated,
true);
3661 return this;
3662 }
3664 if ((comp == nullptr) || comp->CanDeoptimize() ||
3665 comp->HasUnmatchedInputRepresentations()) {
3666 return this;
3667 }
3668
3669
3670
3671 Value* use = comp->input_use_list();
3672 if ((use->instruction() == this) && comp->HasOnlyUse(use)) {
3673 if (negated) {
3674 comp->NegateComparison();
3675 }
3677 flow_graph->CopyDeoptTarget(this, comp);
3678
3679
3680 comp->RemoveEnvironment();
3681
3682 comp->RemoveFromGraph();
3684 if (FLAG_trace_optimization && flow_graph->should_print()) {
3685 THR_Print(
"Merging comparison v%" Pd "\n", comp->ssa_temp_index());
3686 }
3687
3688
3689 ASSERT(comp->input_use_list() ==
nullptr);
3690 comp->ClearSSATempIndex();
3691 comp->ClearTempIndex();
3692 }
3693
3694 return this;
3695 }
3696
3699 comparison()->operation_cid() == kMintCid)) {
3703 BinaryIntegerOpInstr* bit_and = nullptr;
3704 bool negate = false;
3706 &negate)) {
3711 }
3712 if (bit_and != nullptr) {
3713 if (FLAG_trace_optimization && flow_graph->should_print()) {
3715 bit_and->ssa_temp_index());
3716 }
3717 TestIntInstr*
test =
new TestIntInstr(
3722 bit_and->right()->Copy(zone));
3725 flow_graph->CopyDeoptTarget(this, bit_and);
3727 bit_and->RemoveFromGraph();
3728 }
3729 }
3730 }
3731 return this;
3732}
void SetComparison(ComparisonInstr *comp)
intptr_t operation_cid() const
virtual Representation representation() const
bool CanDeoptimize() const
friend class ComparisonInstr
InstructionSource source() const
static bool IsSupported(Representation representation)
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)