Index: test/unittests/compiler/js-typed-lowering-unittest.cc |
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc |
index 5128a3faba27fc4d1219eed9b02a58c77db8ed65..45af02c1ce3c6a15dfd9c2ace959e2ddd859d260 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -889,11 +889,30 @@ TEST_F(JSTypedLoweringTest, JSSubtractSmis) { |
} |
// ----------------------------------------------------------------------------- |
+// JSShiftLeft |
+ |
+TEST_F(JSTypedLoweringTest, JSShiftLeftSmis) { |
+ BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall, |
+ BinaryOperationHints::kSignedSmall, |
+ BinaryOperationHints::kSignedSmall); |
+ Node* lhs = Parameter(Type::Number(), 2); |
+ Node* rhs = Parameter(Type::Number(), 3); |
+ Node* effect = graph()->start(); |
+ Node* control = graph()->start(); |
+ Reduction r = Reduce(graph()->NewNode( |
+ javascript()->ShiftLeft(hints), lhs, rhs, UndefinedConstant(), |
+ EmptyFrameState(), EmptyFrameState(), effect, control)); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), |
+ IsSpeculativeNumberShiftLeft(BinaryOperationHints::kSignedSmall, |
+ lhs, rhs, effect, control)); |
+} |
+ |
+// ----------------------------------------------------------------------------- |
// JSInstanceOf |
// Test that instanceOf is reduced if and only if the right-hand side is a |
// function constant. Functional correctness is ensured elsewhere. |
- |
TEST_F(JSTypedLoweringTest, JSInstanceOfSpecializationWithoutSmiCheck) { |
Node* const context = Parameter(Type::Any()); |
Node* const frame_state = EmptyFrameState(); |