Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index ef3f64df61a88df647f23bf16e442a8441beed61..d2d8c13401aa955d193e0aab4fe2eeba8e494997 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1941,21 +1941,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
} else { |
bool truncating = instr->CanTruncateToInt32(); |
- if (CpuFeatures::IsSafeForSnapshot(SSE2)) { |
- LOperand* value = UseRegister(instr->value()); |
- LOperand* xmm_temp = |
- (truncating && CpuFeatures::IsSupported(SSE3)) |
- ? NULL |
- : FixedTemp(xmm1); |
- LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); |
- return AssignEnvironment(DefineSameAsFirst(res)); |
- } else { |
- LOperand* value = UseFixed(instr->value(), ecx); |
- LTaggedToINoSSE2* res = |
- new(zone()) LTaggedToINoSSE2(value, TempRegister(), |
- TempRegister(), TempRegister()); |
- return AssignEnvironment(DefineFixed(res, ecx)); |
- } |
+ LOperand* value = UseRegister(instr->value()); |
+ LOperand* xmm_temp = |
+ (CpuFeatures::IsSafeForSnapshot(SSE2) && !truncating) |
+ ? FixedTemp(xmm1) : NULL; |
+ LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); |
+ return AssignEnvironment(DefineSameAsFirst(res)); |
} |
} |
} else if (from.IsDouble()) { |
@@ -1975,7 +1966,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
} else { |
ASSERT(to.IsInteger32()); |
bool truncating = instr->CanTruncateToInt32(); |
- bool needs_temp = truncating && !CpuFeatures::IsSupported(SSE3); |
+ bool needs_temp = CpuFeatures::IsSafeForSnapshot(SSE2) && !truncating; |
LOperand* value = needs_temp ? |
UseTempRegister(instr->value()) : UseRegister(instr->value()); |
LOperand* temp = needs_temp ? TempRegister() : NULL; |