Workaround to avoid generic lowering breaking branches.
authormstarzinger@chromium.org <mstarzinger@chromium.org>
Fri, 29 Aug 2014 15:01:50 +0000 (15:01 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org>
Fri, 29 Aug 2014 15:01:50 +0000 (15:01 +0000)
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/520643002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler/js-generic-lowering.cc

index 4d0753c..b8cf803 100644 (file)
@@ -385,9 +385,14 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
 
 
 Node* JSGenericLowering::LowerBranch(Node* node) {
-  Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0),
-                                jsgraph()->TrueConstant());
-  node->ReplaceInput(0, test);
+  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);
+  }
   return node;
 }