Index: src/compiler/ia32/instruction-selector-ia32-unittest.cc |
diff --git a/src/compiler/ia32/instruction-selector-ia32-unittest.cc b/src/compiler/ia32/instruction-selector-ia32-unittest.cc |
index 60708c1ebe64abff032339100eccd00d49d7e6ee..447f562622d0d2f88e07494ccf6ff92f2cbb84aa 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32-unittest.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32-unittest.cc |
@@ -75,6 +75,32 @@ TEST_F(InstructionSelectorTest, Int32SubWithImmediate) { |
// ----------------------------------------------------------------------------- |
+// Conversions. |
+ |
+ |
+TEST_F(InstructionSelectorTest, ChangeFloat32ToFloat64WithParameter) { |
+ StreamBuilder m(this, kMachFloat32, kMachFloat64); |
+ m.Return(m.ChangeFloat32ToFloat64(m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kSSECvtss2sd, s[0]->arch_opcode()); |
+ EXPECT_EQ(1U, s[0]->InputCount()); |
+ EXPECT_EQ(1U, s[0]->OutputCount()); |
+} |
+ |
+ |
+TEST_F(InstructionSelectorTest, TruncateFloat64ToFloat32WithParameter) { |
+ StreamBuilder m(this, kMachFloat64, kMachFloat32); |
+ m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kSSECvtsd2ss, s[0]->arch_opcode()); |
+ EXPECT_EQ(1U, s[0]->InputCount()); |
+ EXPECT_EQ(1U, s[0]->OutputCount()); |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
// Loads and stores |
namespace { |