Workaround to avoid generic lowering breaking branches.

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
This commit is contained in:
mstarzinger@chromium.org 2014-08-29 15:01:50 +00:00
parent e552ffc687
commit 1047a48c0c

View 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;
}