Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 84aa2a61dd7f0faf93de0a4fdbacdc8a9f2d2ed4..7cadec5c9aff51da9b51e81e612f0a47a6485b91 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1002,7 +1002,9 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
// deoptimization environment. |
Representation rep = value->representation(); |
HType type = value->type(); |
- if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean()) { |
+ ToBooleanStub::Types expected = instr->expected_input_types(); |
+ if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean() && |
+ expected != ToBooleanStub::all_types()) { |
return AssignEnvironment(result); |
} |
return result; |