Index: test/cctest/compiler/test-js-typed-lowering.cc |
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc |
index 4d53ef363df6bd7d7abd676e3cb9bc8209593fb2..a132a1312dfc6dfd764ffe3fa0bac1f960d89127 100644 |
--- a/test/cctest/compiler/test-js-typed-lowering.cc |
+++ b/test/cctest/compiler/test-js-typed-lowering.cc |
@@ -547,12 +547,7 @@ TEST(JSToBoolean_replacement) { |
for (size_t i = 0; i < arraysize(types); i++) { |
Node* n = R.Parameter(types[i]); |
- Node* c = R.graph.NewNode(R.javascript.ToBoolean(), n, R.context(), |
- R.start(), R.start()); |
- Node* effect_use = R.UseForEffect(c); |
- Node* add = R.graph.NewNode(R.simplified.ReferenceEqual(Type::Any()), n, c); |
- |
- R.CheckEffectInput(c, effect_use); |
+ Node* c = R.graph.NewNode(R.javascript.ToBoolean(), n, R.context()); |
Node* r = R.reduce(c); |
if (types[i]->Is(Type::Boolean())) { |
@@ -562,10 +557,6 @@ TEST(JSToBoolean_replacement) { |
} else { |
CHECK_EQ(IrOpcode::kHeapConstant, r->opcode()); |
} |
- |
- CHECK_EQ(n, add->InputAt(0)); |
- CHECK_EQ(r, add->InputAt(1)); |
- R.CheckEffectInput(R.start(), effect_use); |
} |
} |
@@ -757,15 +748,12 @@ TEST(UnaryNot) { |
for (size_t i = 0; i < arraysize(kJSTypes); i++) { |
Node* orig = R.Unop(opnot, R.Parameter(kJSTypes[i])); |
- Node* use = R.graph.NewNode(R.common.Return(), orig); |
Node* r = R.reduce(orig); |
- // TODO(titzer): test will break if/when js-typed-lowering constant folds. |
- CHECK_EQ(IrOpcode::kBooleanNot, use->InputAt(0)->opcode()); |
if (r == orig && orig->opcode() == IrOpcode::kJSToBoolean) { |
// The original node was turned into a ToBoolean. |
CHECK_EQ(IrOpcode::kJSToBoolean, r->opcode()); |
- } else { |
+ } else if (r->opcode() != IrOpcode::kHeapConstant) { |
CHECK_EQ(IrOpcode::kBooleanNot, r->opcode()); |
} |
} |
@@ -1186,33 +1174,6 @@ TEST(Int32BinopEffects) { |
} |
-TEST(UnaryNotEffects) { |
- JSTypedLoweringTester R; |
- const Operator* opnot = R.javascript.UnaryNot(); |
- |
- for (size_t i = 0; i < arraysize(kJSTypes); i++) { |
- Node* p0 = R.Parameter(kJSTypes[i], 0); |
- Node* orig = R.Unop(opnot, p0); |
- Node* effect_use = R.UseForEffect(orig); |
- Node* value_use = R.graph.NewNode(R.common.Return(), orig); |
- Node* r = R.reduce(orig); |
- // TODO(titzer): test will break if/when js-typed-lowering constant folds. |
- CHECK_EQ(IrOpcode::kBooleanNot, value_use->InputAt(0)->opcode()); |
- |
- if (r == orig && orig->opcode() == IrOpcode::kJSToBoolean) { |
- // The original node was turned into a ToBoolean, which has an effect. |
- CHECK_EQ(IrOpcode::kJSToBoolean, r->opcode()); |
- R.CheckEffectInput(R.start(), orig); |
- R.CheckEffectInput(orig, effect_use); |
- } else { |
- // effect should have been removed from this node. |
- CHECK_EQ(IrOpcode::kBooleanNot, r->opcode()); |
- R.CheckEffectInput(R.start(), effect_use); |
- } |
- } |
-} |
- |
- |
TEST(Int32AddNarrowing) { |
{ |
JSBitwiseTypedLoweringTester R; |