diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-02-18 07:26:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-02-18 07:26:17 +0000 |
commit | 45af8fd8c2394fdc92ce3b528cc03dd1eb8c5b45 (patch) | |
tree | 6f5bd6a65c0248297d49ac3acf14ab43bfb94c6e | |
parent | bce4805d6fec26b8261367a460cda177b71bf551 (diff) |
If SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
advantage of fisttpll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26288 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index aa48d09fd4..7c84850683 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -101,12 +101,13 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM) setOperationAction(ISD::FP_TO_UINT , MVT::i8 , Promote); setOperationAction(ISD::FP_TO_UINT , MVT::i16 , Promote); - if (X86ScalarSSE) + if (X86ScalarSSE && !Subtarget->hasSSE3()) // Expand FP_TO_UINT into a select. // FIXME: We would like to use a Custom expander here eventually to do // the optimal thing for SSE vs. the default expansion in the legalizer. setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Expand); else + // With SSE3 we can use fisttpll to convert to a signed i64. setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Promote); setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand); |