From: Duraid Madina Date: Wed, 2 Nov 2005 07:32:59 +0000 (+0000) Subject: "fix" support for FP constants (this code asserts in the scheduler, X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=056728f19221b2cd5a604a8204b2809bcb48fd46;p=oota-llvm.git "fix" support for FP constants (this code asserts in the scheduler, though) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24152 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp index d3487f27862..9b26a25e9a2 100644 --- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp +++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp @@ -322,10 +322,12 @@ SDOperand IA64DAGToDAGISel::Select(SDOperand Op) { * case ISD::DYNAMIC_STACKALLOC: */ case ISD::ConstantFP: { + SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so.. + if (cast(N)->isExactlyValue(+0.0)) - return CurDAG->getRegister(IA64::F0, MVT::f64); // load 0.0 + return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64); else if (cast(N)->isExactlyValue(+1.0)) - return CurDAG->getRegister(IA64::F1, MVT::f64); // load 1.0 + return CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64); else assert(0 && "Unexpected FP constant!"); }