ARM: VIXL32: Merge (un)signed extensions and integer additions
Test: m test-art-target-run-test-551-checker-shifter-operand
Change-Id: I041e80e51bf0954b38ab20dfa9b14aa7f6d6c53b
diff --git a/compiler/optimizing/instruction_simplifier_arm.cc b/compiler/optimizing/instruction_simplifier_arm.cc
index fe22595..a025fb1 100644
--- a/compiler/optimizing/instruction_simplifier_arm.cc
+++ b/compiler/optimizing/instruction_simplifier_arm.cc
@@ -29,8 +29,6 @@
namespace arm {
-using helpers::ShifterOperandSupportsExtension;
-
bool InstructionSimplifierArmVisitor::TryMergeIntoShifterOperand(HInstruction* use,
HInstruction* bitfield_op,
bool do_merge) {
@@ -76,7 +74,7 @@
: kMaxLongShiftDistance;
if (HDataProcWithShifterOp::IsExtensionOp(op_kind)) {
- if (!ShifterOperandSupportsExtension(use)) {
+ if (!use->IsAdd() && (!use->IsSub() || use->GetType() != Primitive::kPrimLong)) {
return false;
}
// Shift by 1 is a special case that results in the same number and type of instructions