summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-24 07:53:47 +0000
committerChris Lattner <sabre@nondot.org>2006-03-24 07:53:47 +0000
commita90b7141edf0337d397ee99572494577ea5f563f (patch)
treed680af79772d58d1a05c15f861527a4d2f22d245 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parentab882abce85b65c300349a2bebd49ef57fc1f79e (diff)
downloadbcm5719-llvm-a90b7141edf0337d397ee99572494577ea5f563f.tar.gz
bcm5719-llvm-a90b7141edf0337d397ee99572494577ea5f563f.zip
Disable the i32->float G5 optimization. It is unsafe, as documented in the
comment. This fixes 177.mesa, and McCat/09-vor with the td scheduler. llvm-svn: 27060
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index f228cc22b01..09494a596cc 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -140,7 +140,12 @@ PPCTargetLowering::PPCTargetLowering(TargetMachine &TM)
// 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);
- setOperationAction(ISD::SINT_TO_FP, MVT::i32, Custom);
+
+ // FIXME: disable this lowered code. This generates 64-bit register values,
+ // and we don't model the fact that the top part is clobbered by calls. We
+ // need to flag these together so that the value isn't live across a call.
+ //setOperationAction(ISD::SINT_TO_FP, MVT::i32, 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 {
@@ -359,6 +364,7 @@ SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
FP = DAG.getNode(ISD::FP_ROUND, MVT::f32, FP);
return FP;
}
+ break;
case ISD::SELECT_CC: {
// Turn FP only select_cc's into fsel instructions.
OpenPOWER on IntegriCloud