From 6892f28e99f0d6e85f7be1d802231471cfd82839 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 17 Jan 2006 02:32:49 +0000 Subject: [PATCH] SSE does not support i64 SINT_TO_FP (FP stack doesn't either, but we custom expand it), so ask legalizer to expand i32 UINT_TO_FP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25386 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 153db5514ec..5ed9691ebbc 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -52,7 +52,12 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM) setOperationAction(ISD::UINT_TO_FP , MVT::i1 , Promote); setOperationAction(ISD::UINT_TO_FP , MVT::i8 , Promote); setOperationAction(ISD::UINT_TO_FP , MVT::i16 , Promote); - setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote); + + if (X86ScalarSSE) + // No SSE i64 SINT_TO_FP, so expand i32 UINT_TO_FP instead. + setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Expand); + else + setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote); // Promote i1/i8 SINT_TO_FP to larger SINT_TO_FP's, as X86 doesn't have // this operation.