| Index: test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
|
| diff --git a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
|
| index 163175bcb896573e1c967c204d222bd5e6bffebb..02c8d2e06dd86156c4b04b90e97bd982818aed10 100644
|
| --- a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
|
| +++ b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
|
| @@ -2242,6 +2242,21 @@ TEST_F(InstructionSelectorTest, Word32SarWithWord32Shl) {
|
| }
|
| }
|
|
|
| +
|
| +TEST_F(InstructionSelectorTest, Word32Clz) {
|
| + StreamBuilder m(this, kMachUint32, kMachUint32);
|
| + Node* const p0 = m.Parameter(0);
|
| + Node* const n = m.Word32Clz(p0);
|
| + m.Return(n);
|
| + Stream s = m.Build();
|
| + ASSERT_EQ(1U, s.size());
|
| + EXPECT_EQ(kArm64Clz32, 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()));
|
| +}
|
| +
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|