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 ce11fdef815232be74f581a36e8de72a0e50df9b..b14e9d392d8bb649376f8721de52f497c05568ab 100644 |
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc |
@@ -1438,6 +1438,55 @@ TEST_F(MachineOperatorReducerTest, Float64InsertHighWord32WithConstant) { |
// ----------------------------------------------------------------------------- |
+// Float64Equal |
+ |
+ |
+TEST_F(MachineOperatorReducerTest, Float64EqualWithFloat32Conversions) { |
+ Node* const p0 = Parameter(0); |
+ Node* const p1 = Parameter(1); |
+ Reduction const r = Reduce(graph()->NewNode( |
+ machine()->Float64Equal(), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p0), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p1))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsFloat32Equal(p0, p1)); |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
+// Float64LessThan |
+ |
+ |
+TEST_F(MachineOperatorReducerTest, Float64LessThanWithFloat32Conversions) { |
+ Node* const p0 = Parameter(0); |
+ Node* const p1 = Parameter(1); |
+ Reduction const r = Reduce(graph()->NewNode( |
+ machine()->Float64LessThan(), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p0), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p1))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsFloat32LessThan(p0, p1)); |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
+// Float64LessThanOrEqual |
+ |
+ |
+TEST_F(MachineOperatorReducerTest, |
+ Float64LessThanOrEqualWithFloat32Conversions) { |
+ Node* const p0 = Parameter(0); |
+ Node* const p1 = Parameter(1); |
+ Reduction const r = Reduce(graph()->NewNode( |
+ machine()->Float64LessThanOrEqual(), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p0), |
+ graph()->NewNode(machine()->ChangeFloat32ToFloat64(), p1))); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsFloat32LessThanOrEqual(p0, p1)); |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
// Store |