Index: test/unittests/compiler/arm/instruction-selector-arm-unittest.cc |
diff --git a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc |
index e5b515621659bc7c31a0ac2e951b6a984da8a570..62abeda1b5403c19cdee204fb16c95d23438681e 100644 |
--- a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc |
+++ b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc |
@@ -2545,8 +2545,7 @@ |
TEST_F(InstructionSelectorTest, Word32AndWithUbfxImmediateForARMv7) { |
- TRACED_FORRANGE(int32_t, width, 9, 23) { |
- if (width == 16) continue; // Uxth. |
+ TRACED_FORRANGE(int32_t, width, 1, 32) { |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return(m.Word32And(m.Parameter(0), |
m.Int32Constant(0xffffffffu >> (32 - width)))); |
@@ -2557,8 +2556,7 @@ |
EXPECT_EQ(0, s.ToInt32(s[0]->InputAt(1))); |
EXPECT_EQ(width, s.ToInt32(s[0]->InputAt(2))); |
} |
- TRACED_FORRANGE(int32_t, width, 9, 23) { |
- if (width == 16) continue; // Uxth. |
+ TRACED_FORRANGE(int32_t, width, 1, 32) { |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return(m.Word32And(m.Int32Constant(0xffffffffu >> (32 - width)), |
m.Parameter(0))); |
@@ -2574,7 +2572,7 @@ |
TEST_F(InstructionSelectorTest, Word32AndWithBfcImmediateForARMv7) { |
TRACED_FORRANGE(int32_t, lsb, 0, 31) { |
- TRACED_FORRANGE(int32_t, width, 9, (24 - lsb) - 1) { |
+ TRACED_FORRANGE(int32_t, width, 9, (32 - lsb) - 1) { |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return(m.Word32And( |
m.Parameter(0), |
@@ -2591,7 +2589,7 @@ |
} |
} |
TRACED_FORRANGE(int32_t, lsb, 0, 31) { |
- TRACED_FORRANGE(int32_t, width, 9, (24 - lsb) - 1) { |
+ TRACED_FORRANGE(int32_t, width, 9, (32 - lsb) - 1) { |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return( |
m.Word32And(m.Int32Constant(~((0xffffffffu >> (32 - width)) << lsb)), |
@@ -2830,11 +2828,8 @@ |
TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrWithImmediateForARMv7) { |
- TRACED_FORRANGE(int32_t, lsb, 1, 31) { |
+ TRACED_FORRANGE(int32_t, lsb, 0, 31) { |
TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) { |
- if (((width == 8) || (width == 16)) && |
- ((lsb == 8) || (lsb == 16) || (lsb == 24))) |
- continue; // Uxtb/h ror. |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(lsb)), |
m.Int32Constant(0xffffffffu >> (32 - width)))); |
@@ -2846,11 +2841,8 @@ |
EXPECT_EQ(width, s.ToInt32(s[0]->InputAt(2))); |
} |
} |
- TRACED_FORRANGE(int32_t, lsb, 1, 31) { |
+ TRACED_FORRANGE(int32_t, lsb, 0, 31) { |
TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) { |
- if (((width == 8) || (width == 16)) && |
- ((lsb == 8) || (lsb == 16) || (lsb == 24))) |
- continue; // Uxtb/h ror. |
StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
m.Return(m.Word32And(m.Int32Constant(0xffffffffu >> (32 - width)), |
m.Word32Shr(m.Parameter(0), m.Int32Constant(lsb)))); |
@@ -2865,62 +2857,6 @@ |
} |
-TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xff) { |
- TRACED_FORRANGE(int32_t, shr, 1, 3) { |
- StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
- Node* const p0 = m.Parameter(0); |
- Node* const r = m.Word32And(m.Word32Shr(p0, m.Int32Constant(shr * 8)), |
- m.Int32Constant(0xff)); |
- m.Return(r); |
- Stream s = m.Build(); |
- ASSERT_EQ(1U, s.size()); |
- EXPECT_EQ(kArmUxtb, s[0]->arch_opcode()); |
- ASSERT_EQ(2U, s[0]->InputCount()); |
- EXPECT_EQ(shr * 8, s.ToInt32(s[0]->InputAt(1))); |
- } |
- TRACED_FORRANGE(int32_t, shr, 1, 3) { |
- StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
- Node* const p0 = m.Parameter(0); |
- Node* const r = m.Word32And(m.Int32Constant(0xff), |
- m.Word32Shr(p0, m.Int32Constant(shr * 8))); |
- m.Return(r); |
- Stream s = m.Build(); |
- ASSERT_EQ(1U, s.size()); |
- EXPECT_EQ(kArmUxtb, s[0]->arch_opcode()); |
- ASSERT_EQ(2U, s[0]->InputCount()); |
- EXPECT_EQ(shr * 8, s.ToInt32(s[0]->InputAt(1))); |
- } |
-} |
- |
- |
-TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xffff) { |
- TRACED_FORRANGE(int32_t, shr, 1, 3) { |
- StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
- Node* const p0 = m.Parameter(0); |
- Node* const r = m.Word32And(m.Word32Shr(p0, m.Int32Constant(shr * 8)), |
- m.Int32Constant(0xffff)); |
- m.Return(r); |
- Stream s = m.Build(); |
- ASSERT_EQ(1U, s.size()); |
- EXPECT_EQ(kArmUxth, s[0]->arch_opcode()); |
- ASSERT_EQ(2U, s[0]->InputCount()); |
- EXPECT_EQ(shr * 8, s.ToInt32(s[0]->InputAt(1))); |
- } |
- TRACED_FORRANGE(int32_t, shr, 1, 3) { |
- StreamBuilder m(this, MachineType::Int32(), MachineType::Int32()); |
- Node* const p0 = m.Parameter(0); |
- Node* const r = m.Word32And(m.Int32Constant(0xffff), |
- m.Word32Shr(p0, m.Int32Constant(shr * 8))); |
- m.Return(r); |
- Stream s = m.Build(); |
- ASSERT_EQ(1U, s.size()); |
- EXPECT_EQ(kArmUxth, s[0]->arch_opcode()); |
- ASSERT_EQ(2U, s[0]->InputCount()); |
- EXPECT_EQ(shr * 8, s.ToInt32(s[0]->InputAt(1))); |
- } |
-} |
- |
- |
TEST_F(InstructionSelectorTest, Word32Clz) { |
StreamBuilder m(this, MachineType::Uint32(), MachineType::Uint32()); |
Node* const p0 = m.Parameter(0); |