Index: test/unittests/compiler/machine-operator-reducer-unittest.cc |
diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
index 7de6c7d2f24a6beffe37f5a5ffa4ac9f4af6bfc9..6f76d5cebcc061e7f216e8e0df95a6512ee471fb 100644 |
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
@@ -289,7 +289,6 @@ TEST_F(MachineOperatorReducerTest, |
EXPECT_EQ(value, reduction.replacement()); |
} |
- |
TEST_F(MachineOperatorReducerTest, ChangeFloat64ToInt32WithConstant) { |
TRACED_FOREACH(int32_t, x, kInt32Values) { |
Reduction reduction = Reduce(graph()->NewNode( |
@@ -1506,6 +1505,26 @@ TEST_F(MachineOperatorReducerTest, Int32MulWithOverflowWithConstant) { |
} |
// ----------------------------------------------------------------------------- |
+// Int32LessThan |
+ |
+TEST_F(MachineOperatorReducerTest, Int32LessThanWithWord32Or) { |
+ Node* const p0 = Parameter(0); |
+ TRACED_FOREACH(int32_t, x, kInt32Values) { |
+ Node* word32_or = |
+ graph()->NewNode(machine()->Word32Or(), p0, Int32Constant(x)); |
+ Node* less_than = graph()->NewNode(machine()->Int32LessThan(), word32_or, |
+ Int32Constant(0)); |
+ Reduction r = Reduce(less_than); |
+ if (x < 0) { |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsInt32Constant(1)); |
+ } else { |
+ ASSERT_FALSE(r.Changed()); |
+ } |
+ } |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// Uint32LessThan |
TEST_F(MachineOperatorReducerTest, Uint32LessThanWithWord32Sar) { |