[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Aug 24 22:04:22 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelDAGToDAG.cpp updated: 1.28 -> 1.29
---
Log message:
Implement support for taking the address of constant pool indices, which
is used by the int -> FP code among other things. This gets
2005-05-12-Int64ToFP past that failure, to dying on lack of support for add_parts
---
Diffs of the changes: (+10 -0)
PPC32ISelDAGToDAG.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.28 llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.29
--- llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.28 Wed Aug 24 23:47:18 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp Thu Aug 25 00:04:11 2005
@@ -557,6 +557,16 @@
getI32Imm(0));
break;
}
+ case ISD::ConstantPool: {
+ unsigned CPIIdx = cast<ConstantPoolSDNode>(N)->getIndex();
+ SDOperand Tmp, CPI = CurDAG->getTargetConstantPool(CPIIdx, MVT::i32);
+ if (PICEnabled)
+ Tmp = CurDAG->getTargetNode(PPC::ADDIS, MVT::i32, getGlobalBaseReg(),CPI);
+ else
+ Tmp = CurDAG->getTargetNode(PPC::LIS, MVT::i32, CPI);
+ CurDAG->SelectNodeTo(N, MVT::i32, PPC::LA, Tmp, CPI);
+ break;
+ }
case ISD::GlobalAddress: {
GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal();
SDOperand Tmp;
More information about the llvm-commits
mailing list