Index: test/unittests/compiler/simplified-operator-reducer-unittest.cc |
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
index 7f8e43d4284e6d9bae2948510b0ba7e4617004ca..8a42f7d3ebc620f626f54abd639b8808a60f8a5b 100644 |
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc |
@@ -478,126 +478,6 @@ TEST_F(SimplifiedOperatorReducerTest, ChangeUint32ToTagged) { |
} |
} |
- |
-// ----------------------------------------------------------------------------- |
-// LoadElement |
- |
- |
-TEST_F(SimplifiedOperatorReducerTest, LoadElementWithConstantKeyAndLength) { |
- ElementAccess const access = {kTypedArrayBoundsCheck, kUntaggedBase, 0, |
- Type::Any(), kMachAnyTagged}; |
- ElementAccess access_nocheck = access; |
- access_nocheck.bounds_check = kNoBoundsCheck; |
- Node* const base = Parameter(0); |
- Node* const effect = graph()->start(); |
- { |
- Node* const key = NumberConstant(-42.0); |
- Node* const length = NumberConstant(100.0); |
- Reduction r = Reduce(graph()->NewNode(simplified()->LoadElement(access), |
- base, key, length, effect)); |
- ASSERT_FALSE(r.Changed()); |
- } |
- { |
- Node* const key = NumberConstant(-0.0); |
- Node* const length = NumberConstant(1.0); |
- Reduction r = Reduce(graph()->NewNode(simplified()->LoadElement(access), |
- base, key, length, effect)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsLoadElement(access_nocheck, base, key, length, effect)); |
- } |
- { |
- Node* const key = NumberConstant(0); |
- Node* const length = NumberConstant(1); |
- Reduction r = Reduce(graph()->NewNode(simplified()->LoadElement(access), |
- base, key, length, effect)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsLoadElement(access_nocheck, base, key, length, effect)); |
- } |
- { |
- Node* const key = NumberConstant(42.2); |
- Node* const length = NumberConstant(128); |
- Reduction r = Reduce(graph()->NewNode(simplified()->LoadElement(access), |
- base, key, length, effect)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsLoadElement(access_nocheck, base, key, length, effect)); |
- } |
- { |
- Node* const key = NumberConstant(39.2); |
- Node* const length = NumberConstant(32.0); |
- Reduction r = Reduce(graph()->NewNode(simplified()->LoadElement(access), |
- base, key, length, effect)); |
- ASSERT_FALSE(r.Changed()); |
- } |
-} |
- |
- |
-// ----------------------------------------------------------------------------- |
-// StoreElement |
- |
- |
-TEST_F(SimplifiedOperatorReducerTest, StoreElementWithConstantKeyAndLength) { |
- ElementAccess const access = {kTypedArrayBoundsCheck, kUntaggedBase, 0, |
- Type::Any(), kMachAnyTagged}; |
- ElementAccess access_nocheck = access; |
- access_nocheck.bounds_check = kNoBoundsCheck; |
- Node* const base = Parameter(0); |
- Node* const value = Parameter(1); |
- Node* const effect = graph()->start(); |
- Node* const control = graph()->start(); |
- { |
- Node* const key = NumberConstant(-72.1); |
- Node* const length = NumberConstant(0.0); |
- Reduction r = |
- Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |
- length, value, effect, control)); |
- ASSERT_FALSE(r.Changed()); |
- } |
- { |
- Node* const key = NumberConstant(-0.0); |
- Node* const length = NumberConstant(999); |
- Reduction r = |
- Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |
- length, value, effect, control)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsStoreElement(access_nocheck, base, key, length, value, effect, |
- control)); |
- } |
- { |
- Node* const key = NumberConstant(0); |
- Node* const length = NumberConstant(1); |
- Reduction r = |
- Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |
- length, value, effect, control)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsStoreElement(access_nocheck, base, key, length, value, effect, |
- control)); |
- } |
- { |
- Node* const key = NumberConstant(42.2); |
- Node* const length = NumberConstant(128); |
- Reduction r = |
- Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |
- length, value, effect, control)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), |
- IsStoreElement(access_nocheck, base, key, length, value, effect, |
- control)); |
- } |
- { |
- Node* const key = NumberConstant(39.2); |
- Node* const length = NumberConstant(32.0); |
- Reduction r = |
- Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |
- length, value, effect, control)); |
- ASSERT_FALSE(r.Changed()); |
- } |
-} |
- |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |