Index: test/unittests/compiler/simplified-operator-reducer-unittest.cc |
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
index 6f37609f3a0e5559c3b0a06d810653ab05efaae2..f5ae91d7c1482df0a31bec3db5ad60a8307aa008 100644 |
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
@@ -336,6 +336,22 @@ TEST_F(SimplifiedOperatorReducerTest, TruncateTaggedToWord32WithConstant) { |
} |
// ----------------------------------------------------------------------------- |
+// CheckedFloat64ToInt32 |
+ |
+TEST_F(SimplifiedOperatorReducerTest, CheckedFloat64ToInt32WithConstant) { |
+ Node* effect = graph()->start(); |
+ Node* control = graph()->start(); |
+ TRACED_FOREACH(int32_t, n, kInt32Values) { |
+ Reduction r = Reduce( |
+ graph()->NewNode(simplified()->CheckedFloat64ToInt32( |
+ CheckForMinusZeroMode::kDontCheckForMinusZero), |
+ Float64Constant(n), effect, control)); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsInt32Constant(n)); |
+ } |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// CheckHeapObject |
TEST_F(SimplifiedOperatorReducerTest, CheckHeapObjectWithChangeBitToTagged) { |