From: Chris Lattner Date: Tue, 24 Oct 2006 17:09:43 +0000 (+0000) Subject: Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bacf9f48886c78ba7c27b8590db7c8b3ebb13acc;p=oota-llvm.git 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 --- diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp index 8c38b7561fe..a79cf2ce320 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(N)->isExactlyValue(+0.0)) { - return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64).Val; + V = CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64); } else if (cast(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