Chromium Code Reviews| Index: src/ia32/lithium-ia32.cc |
| =================================================================== |
| --- src/ia32/lithium-ia32.cc (revision 8757) |
| +++ src/ia32/lithium-ia32.cc (working copy) |
| @@ -1041,7 +1041,11 @@ |
| : instr->SecondSuccessor(); |
| return new LGoto(successor->block_id()); |
| } |
| - return new LBranch(UseRegisterAtStart(v)); |
| + ToBooleanStub::Types expected = instr->expected_input_types(); |
| + bool needs_temp = expected.NeedsMap() || expected.IsEmpty(); |
| + LOperand* temp = needs_temp ? TempRegister() : NULL; |
| + LInstruction* branch = new LBranch(UseRegister(v), temp); |
| + return AssignEnvironment(branch); |
|
fschneider
2011/07/28 13:54:58
If we cover all cases, then we don't deopt, right?
|
| } |