aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-24 17:09:43 +0000
committerChris Lattner <sabre@nondot.org>2006-10-24 17:09:43 +0000
commitbacf9f48886c78ba7c27b8590db7c8b3ebb13acc (patch)
treea168075536cc3bbfa892e8bc28c5fbd9d4f7f9d3
parentd1300ab4f0a66691c7fbb0ac08a40af4488729f3 (diff)
Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
isel changes happened months ago. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31164 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/IA64/IA64ISelDAGToDAG.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
index 8c38b7561f..a79cf2ce32 100644
--- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp
+++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
@@ -408,12 +408,16 @@ SDNode *IA64DAGToDAGISel::Select(SDOperand Op) {
case ISD::TargetConstantFP: {
SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so..
+ SDOperand V;
if (cast<ConstantFPSDNode>(N)->isExactlyValue(+0.0)) {
- return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64).Val;
+ V = CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64);
} else if (cast<ConstantFPSDNode>(N)->isExactlyValue(+1.0)) {
- return CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64).Val;
+ V = CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64);
} else
assert(0 && "Unexpected FP constant!");
+
+ ReplaceUses(SDOperand(N, 0), V);
+ return 0;
}
case ISD::FrameIndex: { // TODO: reduce creepyness