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

Unified Diff: test/unittests/compiler/common-operator-unittest.cc

Issue 875263004: [turbofan] Ensure that NTLs are always properly connected to the end. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « test/cctest/compiler/test-control-reducer.cc ('k') | test/unittests/compiler/control-reducer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/common-operator-unittest.cc
diff --git a/test/unittests/compiler/common-operator-unittest.cc b/test/unittests/compiler/common-operator-unittest.cc
index d0ac14519fc43ea3865012a2464c84547af73748..622ecc18df5f417388542cde49f79b7fd11dbb9e 100644
--- a/test/unittests/compiler/common-operator-unittest.cc
+++ b/test/unittests/compiler/common-operator-unittest.cc
@@ -28,6 +28,7 @@ struct SharedOperator {
int value_input_count;
int effect_input_count;
int control_input_count;
+ int value_output_count;
int effect_output_count;
int control_output_count;
};
@@ -39,19 +40,21 @@ std::ostream& operator<<(std::ostream& os, const SharedOperator& fop) {
const SharedOperator kSharedOperators[] = {
-#define SHARED(Name, properties, value_input_count, effect_input_count, \
- control_input_count, effect_output_count, control_output_count) \
- { \
- &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \
- value_input_count, effect_input_count, control_input_count, \
- effect_output_count, control_output_count \
+#define SHARED(Name, properties, value_input_count, effect_input_count, \
+ control_input_count, value_output_count, effect_output_count, \
+ control_output_count) \
+ { \
+ &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \
+ value_input_count, effect_input_count, control_input_count, \
+ value_output_count, effect_output_count, control_output_count \
}
- SHARED(Dead, Operator::kFoldable, 0, 0, 0, 0, 1),
- SHARED(End, Operator::kFoldable, 0, 0, 1, 0, 0),
- SHARED(IfTrue, Operator::kFoldable, 0, 0, 1, 0, 1),
- SHARED(IfFalse, Operator::kFoldable, 0, 0, 1, 0, 1),
- SHARED(Throw, Operator::kFoldable, 1, 1, 1, 0, 1),
- SHARED(Return, Operator::kNoProperties, 1, 1, 1, 0, 1)
+ SHARED(Always, Operator::kPure, 0, 0, 0, 1, 0, 0),
+ SHARED(Dead, Operator::kFoldable, 0, 0, 0, 0, 0, 1),
+ SHARED(End, Operator::kFoldable, 0, 0, 1, 0, 0, 0),
+ SHARED(IfTrue, Operator::kFoldable, 0, 0, 1, 0, 0, 1),
+ SHARED(IfFalse, Operator::kFoldable, 0, 0, 1, 0, 0, 1),
+ SHARED(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1),
+ SHARED(Return, Operator::kNoProperties, 1, 1, 1, 0, 0, 1)
#undef SHARED
};
@@ -83,7 +86,7 @@ TEST_P(CommonSharedOperatorTest, NumberOfInputsAndOutputs) {
sop.value_input_count + sop.effect_input_count + sop.control_input_count,
OperatorProperties::GetTotalInputCount(op));
- EXPECT_EQ(0, op->ValueOutputCount());
+ EXPECT_EQ(sop.value_output_count, op->ValueOutputCount());
EXPECT_EQ(sop.effect_output_count, op->EffectOutputCount());
EXPECT_EQ(sop.control_output_count, op->ControlOutputCount());
}
« no previous file with comments | « test/cctest/compiler/test-control-reducer.cc ('k') | test/unittests/compiler/control-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698