Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 09a0e9c066fcc671526ee5dd344a2cd6016c2691..e12fcb761acf29707f924f0eac2dd4ac26243de3 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4905,6 +4905,21 @@ void LCodeGen::DoSmiUntag(LSmiUntag* instr) { |
// If the input is a HeapObject, SmiUntag will set the carry flag. |
__ SmiUntag(result, input, SetCC); |
DeoptimizeIf(cs, instr->environment()); |
+ } else if (instr->hydrogen()->value()->IsLoadKeyed()) { |
+ HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value()); |
+ if (load->UsesMustHandleHole()) { |
+ __ SmiUntag(result, input, SetCC); |
+ if (load->hole_mode() == ALLOW_RETURN_HOLE) { |
+ Label done; |
+ __ b(cc, &done); |
+ __ mov(result, Operand(Smi::FromInt(0))); |
+ __ bind(&done); |
+ } else { |
+ DeoptimizeIf(cs, instr->environment()); |
+ } |
+ } else { |
+ __ SmiUntag(result, input); |
+ } |
} else { |
__ SmiUntag(result, input); |
} |