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 8b65e043f50f128fe227a4af57bc78fbcd6d3a5c..1535ab989487f06ae408d8a08cf44602a5b1d054 100644 |
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
@@ -16,6 +16,7 @@ using testing::AllOf; |
using testing::BitEq; |
using testing::Capture; |
using testing::CaptureEq; |
+using testing::NanSensitiveDoubleEq; |
namespace v8 { |
namespace internal { |
@@ -1399,8 +1400,20 @@ TEST_F(MachineOperatorReducerTest, Float64MulWithMinusOne) { |
// ----------------------------------------------------------------------------- |
-// Float64InsertLowWord32 |
+// Float64Log |
+ |
+TEST_F(MachineOperatorReducerTest, Float64LogWithConstant) { |
+ TRACED_FOREACH(double, x, kFloat64Values) { |
+ Reduction const r = |
+ Reduce(graph()->NewNode(machine()->Float64Log(), Float64Constant(x))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), |
+ IsFloat64Constant(NanSensitiveDoubleEq(std::log(x)))); |
+ } |
+} |
+// ----------------------------------------------------------------------------- |
+// Float64InsertLowWord32 |
TEST_F(MachineOperatorReducerTest, Float64InsertLowWord32WithConstant) { |
TRACED_FOREACH(double, x, kFloat64Values) { |