Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
authorChris Lattner <sabre@nondot.org>
Tue, 24 Oct 2006 17:09:43 +0000 (17:09 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Oct 2006 17:09:43 +0000 (17:09 +0000)
isel changes happened months ago.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31164 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/IA64/IA64ISelDAGToDAG.cpp

index 8c38b7561fe321deebfb551dc9c1a29f2440103d..a79cf2ce320018529531c4e19d34fb5801fbd280 100644 (file)
@@ -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