Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 66c79d1d587c2cf1857789728993c87e2cc97f43..cb15e0d82f4872f7b3bbc1608cf5d49c90126f22 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -2007,7 +2007,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { |
LOperand* value = UseAtStart(instr->value()); |
- return AssignEnvironment(new(zone()) LCheckNonSmi(value)); |
+ LInstruction* result = new(zone()) LCheckNonSmi(value); |
+ if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result); |
+ return result; |
} |