Skip to content

Commit f09afbe

Browse files
alexmarkovCommit Queue
authored andcommitted
[vm/compiler] Cleanup unused handling of stack slot locations in comparisons
Location summary for inputs of integer comparisons uses either RequiresRegister or LocationRegisterOrConstant, so operand cannot be a StackSlot. TEST=ci Change-Id: Idff0f09074be2055f0f9a46d8629c769155eb8ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393044 Reviewed-by: Slava Egorov <[email protected]> Auto-Submit: Alexander Markov <[email protected]> Commit-Queue: Slava Egorov <[email protected]>
1 parent 52cb60b commit f09afbe

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

runtime/vm/compiler/backend/il_ia32.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,6 @@ static Condition EmitSmiComparisonOp(FlowGraphCompiler* compiler,
766766
true_condition = FlipCondition(true_condition);
767767
} else if (right.IsConstant()) {
768768
__ CompareObject(left.reg(), right.constant());
769-
} else if (right.IsStackSlot()) {
770-
__ cmpl(left.reg(), LocationToStackSlotAddress(right));
771769
} else {
772770
__ cmpl(left.reg(), right.reg());
773771
}
@@ -793,8 +791,6 @@ static Condition EmitWordComparisonOp(FlowGraphCompiler* compiler,
793791
__ CompareImmediate(
794792
left.reg(),
795793
static_cast<uword>(Integer::Cast(right.constant()).Value()));
796-
} else if (right.IsStackSlot()) {
797-
__ cmpl(left.reg(), LocationToStackSlotAddress(right));
798794
} else {
799795
__ cmpl(left.reg(), right.reg());
800796
}

runtime/vm/compiler/backend/il_x64.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,6 @@ static Condition EmitSmiComparisonOp(FlowGraphCompiler* compiler,
972972
ASSERT(constant->representation() == kTagged);
973973
__ CompareObject(left.reg(), right.constant());
974974
}
975-
} else if (right.IsStackSlot()) {
976-
__ OBJ(cmp)(left.reg(), LocationToStackSlotAddress(right));
977975
} else {
978976
__ OBJ(cmp)(left.reg(), right.reg());
979977
}
@@ -1009,8 +1007,6 @@ static Condition EmitInt64ComparisonOp(FlowGraphCompiler* compiler,
10091007
} else {
10101008
UNREACHABLE();
10111009
}
1012-
} else if (right.IsStackSlot()) {
1013-
__ cmpq(left.reg(), LocationToStackSlotAddress(right));
10141010
} else {
10151011
__ cmpq(left.reg(), right.reg());
10161012
}

0 commit comments

Comments
 (0)