Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index f9c25c33e9c08a5041e5969ea6b0c8dfecb16caa..a57f5aab4e310739058e05743d1bdb9be9f24154 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -60,13 +60,23 @@ Node* JSGenericLowering::ExternalConstant(ExternalReference ref) { |
Reduction JSGenericLowering::Reduce(Node* node) { |
switch (node->opcode()) { |
-#define DECLARE_CASE(x) \ |
- case IrOpcode::k##x: \ |
- Lower##x(node); \ |
- break; |
- DECLARE_CASE(Branch) |
+#define DECLARE_CASE(x) \ |
+ case IrOpcode::k##x: \ |
+ Lower##x(node); \ |
+ break; |
JS_OP_LIST(DECLARE_CASE) |
#undef DECLARE_CASE |
+ case IrOpcode::kBranch: |
+ // TODO(mstarzinger): If typing is enabled then simplified lowering will |
+ // have inserted the correct ChangeBoolToBit, otherwise we need to perform |
+ // poor-man's representation inference here and insert manual change. |
+ if (!info()->is_typing_enabled()) { |
+ Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), |
+ jsgraph()->TrueConstant()); |
+ node->ReplaceInput(0, test); |
+ break; |
+ } |
+ // Fall-through. |
default: |
// Nothing to see. |
return NoChange(); |
@@ -230,18 +240,6 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, |
} |
-void JSGenericLowering::LowerBranch(Node* node) { |
- if (!info()->is_typing_enabled()) { |
- // TODO(mstarzinger): If typing is enabled then simplified lowering will |
- // have inserted the correct ChangeBoolToBit, otherwise we need to perform |
- // poor-man's representation inference here and insert manual change. |
- Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), |
- jsgraph()->TrueConstant()); |
- node->ReplaceInput(0, test); |
- } |
-} |
- |
- |
void JSGenericLowering::LowerJSUnaryNot(Node* node) { |
Callable callable = CodeFactory::ToBoolean( |
isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL); |