Index: src/compiler/control-reducer.cc |
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc |
index 633dfe5abf0b31eb76b13478d43e029edbb0740b..6e085ad7c23a6347d6a4e668391feaba079186d2 100644 |
--- a/src/compiler/control-reducer.cc |
+++ b/src/compiler/control-reducer.cc |
@@ -87,7 +87,7 @@ class ControlReducerImpl final : public AdvancedReducer { |
} |
// Try to statically fold a condition. |
- Decision DecideCondition(Node* cond, bool recurse = true) { |
+ Decision DecideCondition(Node* cond) { |
switch (cond->opcode()) { |
case IrOpcode::kInt32Constant: |
return Int32Matcher(cond).Is(0) ? kFalse : kTrue; |
@@ -98,19 +98,6 @@ class ControlReducerImpl final : public AdvancedReducer { |
HeapObjectMatcher<Object>(cond).Value().handle(); |
return object->BooleanValue() ? kTrue : kFalse; |
} |
- case IrOpcode::kPhi: { |
- if (!recurse) return kUnknown; // Only go one level deep checking phis. |
- Decision result = kUnknown; |
- // Check if all inputs to a phi result in the same decision. |
- for (int i = cond->op()->ValueInputCount() - 1; i >= 0; i--) { |
- // Recurse only one level, since phis can be involved in cycles. |
- Decision decision = DecideCondition(cond->InputAt(i), false); |
- if (decision == kUnknown) return kUnknown; |
- if (result == kUnknown) result = decision; |
- if (result != decision) return kUnknown; |
- } |
- return result; |
- } |
default: |
break; |
} |