[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Jul 28 09:46:06 PDT 2006



Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.199 -> 1.200
---
Log message:

Fix some ppc64 issues with vector code.


---
Diffs of the changes:  (+7 -4)

 PPCISelLowering.cpp |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.199 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.200
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.199	Wed Jul 26 16:12:04 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp	Fri Jul 28 11:45:47 2006
@@ -652,7 +652,7 @@
   if (TM.getRelocationModel() == Reloc::PIC_) {
     // With PIC, the first instruction is actually "GR+hi(&G)".
     Hi = DAG.getNode(ISD::ADD, PtrVT,
-                     DAG.getNode(PPCISD::GlobalBaseReg, MVT::i32), Hi);
+                     DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi);
   }
   
   Lo = DAG.getNode(ISD::ADD, PtrVT, Hi, Lo);
@@ -741,7 +741,8 @@
                               unsigned VarArgsFrameIndex) {
   // vastart just stores the address of the VarArgsFrameIndex slot into the
   // memory location argument.
-  SDOperand FR = DAG.getFrameIndex(VarArgsFrameIndex, MVT::i32);
+  MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
+  SDOperand FR = DAG.getFrameIndex(VarArgsFrameIndex, PtrVT);
   return DAG.getNode(ISD::STORE, MVT::Other, Op.getOperand(0), FR, 
                      Op.getOperand(1), Op.getOperand(2));
 }
@@ -1388,7 +1389,8 @@
   // then lfd it and fcfid it.
   MachineFrameInfo *FrameInfo = DAG.getMachineFunction().getFrameInfo();
   int FrameIdx = FrameInfo->CreateStackObject(8, 8);
-  SDOperand FIdx = DAG.getFrameIndex(FrameIdx, MVT::i32);
+  MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
+  SDOperand FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
   
   SDOperand Ext64 = DAG.getNode(PPCISD::EXTSW_32, MVT::i32,
                                 Op.getOperand(0));
@@ -2119,7 +2121,8 @@
   // Create a stack slot that is 16-byte aligned.
   MachineFrameInfo *FrameInfo = DAG.getMachineFunction().getFrameInfo();
   int FrameIdx = FrameInfo->CreateStackObject(16, 16);
-  SDOperand FIdx = DAG.getFrameIndex(FrameIdx, MVT::i32);
+  MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
+  SDOperand FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
   
   // Store the input value into Value#0 of the stack slot.
   SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(),






More information about the llvm-commits mailing list