| Index: test/unittests/compiler/js-intrinsic-lowering-unittest.cc
|
| diff --git a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
|
| index 20d5c069fe295dc8f47c6895674026fb8857dd60..cb044afe4c6c08e078aeb59b3779e73b6a53e72a 100644
|
| --- a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
|
| @@ -42,6 +42,62 @@ class JSIntrinsicLoweringTest : public GraphTest {
|
|
|
|
|
| // -----------------------------------------------------------------------------
|
| +// %_ConstructDouble
|
| +
|
| +
|
| +TEST_F(JSIntrinsicLoweringTest, InlineOptimizedConstructDouble) {
|
| + Node* const input0 = Parameter(0);
|
| + Node* const input1 = Parameter(1);
|
| + Node* const context = Parameter(2);
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + Reduction const r = Reduce(graph()->NewNode(
|
| + javascript()->CallRuntime(Runtime::kInlineOptimizedConstructDouble, 2),
|
| + input0, input1, context, effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(
|
| + r.replacement(),
|
| + IsFloat64InsertWord32(
|
| + 1, IsFloat64InsertWord32(0, IsNumberConstant(BitEq(0.0)), input1),
|
| + input0));
|
| +}
|
| +
|
| +
|
| +// -----------------------------------------------------------------------------
|
| +// %_DoubleLo
|
| +
|
| +
|
| +TEST_F(JSIntrinsicLoweringTest, InlineOptimizedDoubleLo) {
|
| + Node* const input = Parameter(0);
|
| + Node* const context = Parameter(1);
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + Reduction const r = Reduce(graph()->NewNode(
|
| + javascript()->CallRuntime(Runtime::kInlineOptimizedDoubleLo, 1), input,
|
| + context, effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(r.replacement(), IsFloat64ExtractWord32(0, input));
|
| +}
|
| +
|
| +
|
| +// -----------------------------------------------------------------------------
|
| +// %_DoubleHi
|
| +
|
| +
|
| +TEST_F(JSIntrinsicLoweringTest, InlineOptimizedDoubleHi) {
|
| + Node* const input = Parameter(0);
|
| + Node* const context = Parameter(1);
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + Reduction const r = Reduce(graph()->NewNode(
|
| + javascript()->CallRuntime(Runtime::kInlineOptimizedDoubleHi, 1), input,
|
| + context, effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(r.replacement(), IsFloat64ExtractWord32(1, input));
|
| +}
|
| +
|
| +
|
| +// -----------------------------------------------------------------------------
|
| // %_IsSmi
|
|
|
|
|
|
|