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 6e513efe553ce7dd7e32409a62f928cad92183d6..b9de98046001fe2f53958ba4592b62a633f82919 100644 |
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
@@ -1464,6 +1464,19 @@ TEST_F(MachineOperatorReducerTest, Float64Atan2WithNaN) { |
} |
// ----------------------------------------------------------------------------- |
+// Float64Cos |
+ |
+TEST_F(MachineOperatorReducerTest, Float64CosWithConstant) { |
+ TRACED_FOREACH(double, x, kFloat64Values) { |
+ Reduction const r = |
+ Reduce(graph()->NewNode(machine()->Float64Cos(), Float64Constant(x))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), |
+ IsFloat64Constant(NanSensitiveDoubleEq(base::ieee754::cos(x)))); |
+ } |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// Float64Exp |
TEST_F(MachineOperatorReducerTest, Float64ExpWithConstant) { |
@@ -1504,6 +1517,19 @@ TEST_F(MachineOperatorReducerTest, Float64Log1pWithConstant) { |
} |
// ----------------------------------------------------------------------------- |
+// Float64Sin |
+ |
+TEST_F(MachineOperatorReducerTest, Float64SinWithConstant) { |
+ TRACED_FOREACH(double, x, kFloat64Values) { |
+ Reduction const r = |
+ Reduce(graph()->NewNode(machine()->Float64Sin(), Float64Constant(x))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), |
+ IsFloat64Constant(NanSensitiveDoubleEq(base::ieee754::sin(x)))); |
+ } |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// Float64InsertLowWord32 |
TEST_F(MachineOperatorReducerTest, Float64InsertLowWord32WithConstant) { |