Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 4b07194c87be3b195062f35afb2a9b4b9b95ec8d..e7883294cd33aa87eeba49b1697d6252dc28bac8 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -701,9 +701,12 @@ void InstructionSelector::VisitNode(Node* node) { |
case IrOpcode::kFloat64Constant: |
return MarkAsDouble(node), VisitConstant(node); |
case IrOpcode::kHeapConstant: |
- case IrOpcode::kNumberConstant: |
- // TODO(turbofan): only mark non-smis as references. |
return MarkAsReference(node), VisitConstant(node); |
+ case IrOpcode::kNumberConstant: { |
+ double value = OpParameter<double>(node); |
+ if (!IsSmiDouble(value)) MarkAsReference(node); |
+ return VisitConstant(node); |
+ } |
case IrOpcode::kCall: |
return VisitCall(node); |
case IrOpcode::kFrameState: |