Index: src/compiler/common-operator-reducer.cc |
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc |
index 1ed05f1834bf7b214db79526d8fc5a2f3698c736..24760dc2f596398de81f39aab9d9819d6b263124 100644 |
--- a/src/compiler/common-operator-reducer.cc |
+++ b/src/compiler/common-operator-reducer.cc |
@@ -99,6 +99,17 @@ Reduction CommonOperatorReducer::ReduceBranch(Node* node) { |
// since we tell the graph reducer that the {branch} was changed and the |
// graph reduction logic will ensure that the uses are revisited properly. |
node->ReplaceInput(0, cond->InputAt(0)); |
+ // Negative the hint for {branch}. |
Sven Panne
2015/06/26 11:40:56
Why do we need the switch at all? Isn't the simple
Benedikt Meurer
2015/06/26 11:43:40
Done.
|
+ switch (BranchHintOf(node->op())) { |
+ case BranchHint::kTrue: |
+ node->set_op(common()->Branch(BranchHint::kFalse)); |
+ break; |
+ case BranchHint::kFalse: |
+ node->set_op(common()->Branch(BranchHint::kTrue)); |
+ break; |
+ case BranchHint::kNone: |
+ break; |
+ } |
return Changed(node); |
} |
Decision const decision = DecideCondition(cond); |