Index: test/compiler-unittests/arm64/instruction-selector-arm64-unittest.cc |
diff --git a/test/compiler-unittests/arm64/instruction-selector-arm64-unittest.cc b/test/compiler-unittests/arm64/instruction-selector-arm64-unittest.cc |
index 2a86924248054f530b32e426c2a8fd0857d9a453..e0de59060ae4aca8ab88a8cd841074dd74f61883 100644 |
--- a/test/compiler-unittests/arm64/instruction-selector-arm64-unittest.cc |
+++ b/test/compiler-unittests/arm64/instruction-selector-arm64-unittest.cc |
@@ -6,8 +6,6 @@ |
#include "test/compiler-unittests/instruction-selector-unittest.h" |
-#include "test/cctest/compiler/instruction-selector-tester.h" |
- |
namespace v8 { |
namespace internal { |
namespace compiler { |
@@ -128,6 +126,37 @@ TEST_F(InstructionSelectorTest, MulDivWithParameter) { |
} |
} |
+ |
+// ----------------------------------------------------------------------------- |
+// Conversions. |
+ |
+ |
+TEST_F(InstructionSelectorTest, ChangeInt32ToInt64WithParameter) { |
+ StreamBuilder m(this, kMachInt64, kMachInt32); |
+ m.Return(m.ChangeInt32ToInt64(m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kArm64Sxtw, s[0]->arch_opcode()); |
+} |
+ |
+ |
+TEST_F(InstructionSelectorTest, ChangeUint32ToUint64WithParameter) { |
+ StreamBuilder m(this, kMachUint64, kMachUint32); |
+ m.Return(m.ChangeUint32ToUint64(m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kArm64Mov32, s[0]->arch_opcode()); |
+} |
+ |
+ |
+TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) { |
+ StreamBuilder m(this, kMachInt32, kMachInt64); |
+ m.Return(m.TruncateInt64ToInt32(m.Parameter(0))); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kArm64Mov32, s[0]->arch_opcode()); |
+} |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |