| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index 9616a3261dd262cbd0f3cd400115067afe586a55..293ecb0a9a125a50aa31e4296234b2be1ea16461 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -1003,10 +1003,13 @@ 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.
|
| + // deoptimization environment. If the instruction is generic no
|
| + // environment is needed since all cases are handled.
|
| 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.IsGeneric()) {
|
| return AssignEnvironment(result);
|
| }
|
| return result;
|
|
|