Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index f776bf339f5d595e63a9a2633a72f7927efd4e97..195d48b23bf5dd1f3f9ea1a8f385342f0d9d4fb2 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -1015,9 +1015,11 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
LBranch* result = new(zone()) LBranch(UseRegister(value)); |
// Tagged values that are not known smis or booleans require a |
// deoptimization environment. |
+ ToBooleanStub::Types expected = instr->expected_input_types(); |
Representation rep = value->representation(); |
HType type = value->type(); |
- if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean()) { |
+ if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean() && |
+ expected != ToBooleanStub::all_types()) { |
Toon Verwaest
2013/06/18 17:01:52
Can you add a comment what expected == all_types m
|
return AssignEnvironment(result); |
} |
return result; |