Chromium Code Reviews| 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 6e9cb30933b82be10551c2fe409b92a5de2a9a61..58f222f8b06c96101e59ad19081a6c400de88198 100644 |
| --- a/test/cctest/compiler/test-js-typed-lowering.cc |
| +++ b/test/cctest/compiler/test-js-typed-lowering.cc |
| @@ -757,7 +757,8 @@ TEST(UnaryNot) { |
| for (size_t i = 0; i < arraysize(kJSTypes); i++) { |
| Node* r = R.ReduceUnop(opnot, kJSTypes[i]); |
| // TODO(titzer): test will break if/when js-typed-lowering constant folds. |
| - CHECK_EQ(IrOpcode::kBooleanNot, r->opcode()); |
| + CHECK(IrOpcode::kBooleanNot == r->opcode() || |
| + IrOpcode::kJSToBoolean == r->opcode()); |
|
titzer
2014/08/29 15:49:38
Can you use a value use here?
Michael Starzinger
2014/09/01 10:25:40
Done.
|
| } |
| } |
| @@ -1184,11 +1185,11 @@ TEST(UnaryNotEffects) { |
| 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, r->opcode()); |
| - |
| - CHECK_EQ(r, value_use->InputAt(0)); |
| + CHECK(IrOpcode::kBooleanNot == r->opcode() || |
| + IrOpcode::kJSToBoolean == r->opcode()); |
|
titzer
2014/08/29 15:49:38
Can you push this condition down into the branch b
Michael Starzinger
2014/09/01 10:25:40
Done.
|
| + CHECK_EQ(IrOpcode::kBooleanNot, value_use->InputAt(0)->opcode()); |
| - if (r->InputAt(0) == orig && orig->opcode() == IrOpcode::kJSToBoolean) { |
| + if (r == orig && orig->opcode() == IrOpcode::kJSToBoolean) { |
| // The original node was turned into a ToBoolean, which has an effect. |
| R.CheckEffectInput(R.start(), orig); |
| R.CheckEffectInput(orig, effect_use); |