Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index ae0d6283f44c1a483964506e5644fbabccbf5ea8..49743fd5218bf86c78e825d67c2ccf1bf9064c38 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -4610,6 +4610,22 @@ void LCodeGen::DoSmiUntag(LSmiUntag* instr) { |
__ And(scratch, input, Operand(kHeapObjectTag)); |
__ SmiUntag(result, input); |
DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); |
+ } else if (instr->hydrogen()->value()->IsLoadKeyed()) { |
+ HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value()); |
+ if (load->UsesMustHandleHole()) { |
+ __ And(scratch, input, Operand(kHeapObjectTag)); |
+ __ SmiUntag(result, input); |
+ if (load->hole_mode() == ALLOW_RETURN_HOLE) { |
+ Label done; |
+ __ Branch(&done, eq, scratch, Operand(zero_reg)); |
+ __ li(result, Operand(Smi::FromInt(0))); |
+ __ bind(&done); |
+ } else { |
+ DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); |
+ } |
+ } else { |
+ __ SmiUntag(result, input); |
+ } |
} else { |
__ SmiUntag(result, input); |
} |