[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 28 22:25:34 PST 2006
Changes in directory llvm/lib/Target/Alpha:
AlphaISelDAGToDAG.cpp updated: 1.30 -> 1.31
AlphaISelLowering.cpp updated: 1.34 -> 1.35
---
Log message:
Update alpha to reflect recent constantfp legalize changes. It's not clear
why all this code isn't autogenerated. :(
---
Diffs of the changes: (+18 -16)
AlphaISelDAGToDAG.cpp | 32 ++++++++++++++++----------------
AlphaISelLowering.cpp | 2 ++
2 files changed, 18 insertions(+), 16 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.30 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.31
--- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.30 Fri Jan 27 17:39:00 2006
+++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Sun Jan 29 00:25:22 2006
@@ -237,23 +237,23 @@
return CurDAG->SelectNodeTo(N, Alpha::LDQr, MVT::i64, MVT::Other,
CPI, Tmp, CurDAG->getEntryNode());
}
- case ISD::ConstantFP:
- if (ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N)) {
- bool isDouble = N->getValueType(0) == MVT::f64;
- MVT::ValueType T = isDouble ? MVT::f64 : MVT::f32;
- if (CN->isExactlyValue(+0.0)) {
- return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS,
- T, CurDAG->getRegister(Alpha::F31, T),
- CurDAG->getRegister(Alpha::F31, T));
- } else if ( CN->isExactlyValue(-0.0)) {
- return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYSNT : Alpha::CPYSNS,
- T, CurDAG->getRegister(Alpha::F31, T),
- CurDAG->getRegister(Alpha::F31, T));
- } else {
- abort();
- }
- break;
+ case ISD::TargetConstantFP: {
+ ConstantFPSDNode *CN = cast<ConstantFPSDNode>(N);
+ bool isDouble = N->getValueType(0) == MVT::f64;
+ MVT::ValueType T = isDouble ? MVT::f64 : MVT::f32;
+ if (CN->isExactlyValue(+0.0)) {
+ return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS,
+ T, CurDAG->getRegister(Alpha::F31, T),
+ CurDAG->getRegister(Alpha::F31, T));
+ } else if ( CN->isExactlyValue(-0.0)) {
+ return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYSNT : Alpha::CPYSNS,
+ T, CurDAG->getRegister(Alpha::F31, T),
+ CurDAG->getRegister(Alpha::F31, T));
+ } else {
+ abort();
}
+ break;
+ }
case ISD::SETCC:
if (MVT::isFloatingPoint(N->getOperand(0).Val->getValueType(0))) {
Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.34 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.35
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.34 Fri Jan 27 21:14:31 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Sun Jan 29 00:25:22 2006
@@ -145,6 +145,8 @@
setStackPointerRegisterToSaveRestore(Alpha::R30);
+ setOperationAction(ISD::ConstantFP, MVT::f64, Expand);
+ setOperationAction(ISD::ConstantFP, MVT::f32, Expand);
addLegalFPImmediate(+0.0); //F31
addLegalFPImmediate(-0.0); //-F31
More information about the llvm-commits
mailing list