summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-01-10 19:41:30 +0000
committerBill Wendling <isanbard@gmail.com>2012-01-10 19:41:30 +0000
commitd5ab02600edb1d3fa2a7322f23e914b0fc83e6b8 (patch)
tree8ef5f268b9028f3da8a02e9acc9b48d3a6962434
parentedbc3451706ab8a23e17774cd52a3efba6e1e53b (diff)
downloadbcm5719-llvm-d5ab02600edb1d3fa2a7322f23e914b0fc83e6b8.tar.gz
bcm5719-llvm-d5ab02600edb1d3fa2a7322f23e914b0fc83e6b8.zip
For i386, don't use the generic code.
As the comment around 7746 says, it's better to use the x87 extended precision here than SSE. And the generic code doesn't know how to do that. It also regains the speed lost for the uint64_to_float.c testcase. <rdar://problem/10669858> llvm-svn: 147869
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index d48cfbf49a5..f153ef35cac 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7714,7 +7714,8 @@ SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op,
return LowerUINT_TO_FP_i64(Op, DAG);
else if (SrcVT == MVT::i32 && X86ScalarSSEf64)
return LowerUINT_TO_FP_i32(Op, DAG);
- else if (SrcVT == MVT::i64 && DstVT == MVT::f32)
+ else if (Subtarget->is64Bit() &&
+ SrcVT == MVT::i64 && DstVT == MVT::f32)
return SDValue();
// Make a 64-bit buffer, and use it to build an FILD.
@@ -7735,7 +7736,7 @@ SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op,
assert(SrcVT == MVT::i64 && "Unexpected type in UINT_TO_FP");
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Op.getOperand(0),
- StackSlot, MachinePointerInfo(),
+ StackSlot, MachinePointerInfo(),
false, false, 0);
// For i64 source, we need to add the appropriate power of 2 if the input
// was negative. This is the same as the optimization in
OpenPOWER on IntegriCloud