Index: src/arm64/lithium-arm64.cc |
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc |
index d58e3cc9916bf01890c550f2b581ae158f17c71c..adc2b5c916e47911c06fe4e62bf37e26eae1b15b 100644 |
--- a/src/arm64/lithium-arm64.cc |
+++ b/src/arm64/lithium-arm64.cc |
@@ -1202,7 +1202,9 @@ LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { |
LOperand* value = UseRegisterAtStart(instr->value()); |
- return AssignEnvironment(new(zone()) LCheckNonSmi(value)); |
+ LInstruction* result = new(zone()) LCheckNonSmi(value); |
+ if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result); |
+ return result; |
} |