| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 8f10008e88d933cf82c2beb77947f7b33510bffb..38641874b6c3c45f0df0ed9d5eb4bde77bf3ec03 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -2753,9 +2753,14 @@ void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) {
|
|
|
| // Check for the hole value.
|
| if (instr->hydrogen()->RequiresHoleCheck()) {
|
| - __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
|
| - __ cmp(result, scratch);
|
| - DeoptimizeIf(eq, instr->environment());
|
| + if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
|
| + __ tst(result, Operand(kSmiTagMask));
|
| + DeoptimizeIf(ne, instr->environment());
|
| + } else {
|
| + __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
|
| + __ cmp(result, scratch);
|
| + DeoptimizeIf(eq, instr->environment());
|
| + }
|
| }
|
| }
|
|
|
|
|