[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
Duraid Madina
duraid at octopus.com.au
Tue Nov 1 23:33:10 PST 2005
Changes in directory llvm/lib/Target/IA64:
IA64ISelDAGToDAG.cpp updated: 1.5 -> 1.6
---
Log message:
"fix" support for FP constants (this code asserts in the scheduler,
though)
---
Diffs of the changes: (+4 -2)
IA64ISelDAGToDAG.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.5 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.6
--- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.5 Tue Nov 1 20:35:04 2005
+++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Wed Nov 2 01:32:59 2005
@@ -322,10 +322,12 @@
* case ISD::DYNAMIC_STACKALLOC:
*/
case ISD::ConstantFP: {
+ SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so..
+
if (cast<ConstantFPSDNode>(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<ConstantFPSDNode>(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!");
}
More information about the llvm-commits
mailing list