Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Unified Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 523633002: Fix typed lowering of JSUnaryNot to work with graph reducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698