Changes in directory llvm/lib/Target/PowerPC:
PPCISelLowering.cpp updated: 1.37 -> 1.38 --- Log message: Correctly Expand or Promote FP_TO_UINT based on the capabilities of the machine. This allows us to generate great code for i32 FP_TO_UINT now on targets with 64 bit extensions. --- Diffs of the changes: (+5 -3) PPCISelLowering.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.37 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.38 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.37 Tue Oct 25 15:54:57 2005 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Tue Oct 25 18:48:36 2005 @@ -81,9 +81,6 @@ setOperationAction(ISD::BRCOND, MVT::Other, Expand); setOperationAction(ISD::BRCONDTWOWAY, MVT::Other, Expand); - // PowerPC does not have FP_TO_UINT - setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); - // PowerPC turns FP_TO_SINT into FCTIWZ and some load/stores. setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); @@ -98,6 +95,11 @@ // They also have instructions for converting between i64 and fp. setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom); setOperationAction(ISD::SINT_TO_FP, MVT::i64, Custom); + // To take advantage of the above i64 FP_TO_SINT, promote i32 FP_TO_UINT + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Promote); + } else { + // PowerPC does not have FP_TO_UINT on 32 bit implementations. + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); } if (TM.getSubtarget<PPCSubtarget>().has64BitRegs()) { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits