Index: test/unittests/compiler/x64/instruction-selector-x64-unittest.cc |
diff --git a/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc b/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc |
index ebdf02448f4413cd955ebedc64739e2a3e1af330..6d0e589e3bf04d4607229e8cbfe64d1ade73943c 100644 |
--- a/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc |
+++ b/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc |
@@ -75,6 +75,7 @@ TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) { |
// ----------------------------------------------------------------------------- |
// Loads and stores |
+ |
namespace { |
struct MemoryAccess { |
@@ -137,6 +138,7 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, |
InstructionSelectorMemoryAccessTest, |
::testing::ValuesIn(kMemoryAccesses)); |
+ |
// ----------------------------------------------------------------------------- |
// ChangeUint32ToUint64. |
@@ -1026,6 +1028,22 @@ TEST_F(InstructionSelectorTest, Float64BinopArithmetic) { |
} |
+TEST_F(InstructionSelectorTest, Float64SubWithMinusZeroAndParameter) { |
+ StreamBuilder m(this, kMachFloat64, kMachFloat64); |
+ Node* const p0 = m.Parameter(0); |
+ Node* const n = m.Float64Sub(m.Float64Constant(-0.0), p0); |
+ m.Return(n); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kSSEFloat64Neg, s[0]->arch_opcode()); |
+ ASSERT_EQ(1U, s[0]->InputCount()); |
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
+ ASSERT_EQ(1U, s[0]->OutputCount()); |
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
+ EXPECT_EQ(kFlags_none, s[0]->flags_mode()); |
+} |
+ |
+ |
// ----------------------------------------------------------------------------- |
// Miscellaneous. |