diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-21 03:41:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-21 03:41:46 +0000 |
commit | c14e5227f06c8abb6f77adf7664fb48b16ba6a98 (patch) | |
tree | 3ac04b7f4e0a84b319dac3dc22a861458b88b073 | |
parent | 269246b03434a6a2243d47d8826481f734753506 (diff) | |
download | bcm5719-llvm-c14e5227f06c8abb6f77adf7664fb48b16ba6a98.tar.gz bcm5719-llvm-c14e5227f06c8abb6f77adf7664fb48b16ba6a98.zip |
Disable constant-offset folding for PowerPC, as the PowerPC target
isn't yet prepared for it.
llvm-svn: 57886
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 553ca107ecf..eb327dcdf23 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -4912,3 +4912,9 @@ SDValue PPCTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) { return DAG.getCopyFromReg(DAG.getEntryNode(), is31 ? PPC::R31 : PPC::R1, MVT::i32); } + +bool +PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The PowerPC target isn't yet aware of offsets. + return false; +} diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.h b/llvm/lib/Target/PowerPC/PPCISelLowering.h index fa689de058c..00f707dd5a2 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.h +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.h @@ -329,6 +329,8 @@ namespace llvm { SDValue Ret, SelectionDAG &DAG) const; + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; + private: SDValue getFramePointerFrameIndex(SelectionDAG & DAG) const; SDValue getReturnAddrFrameIndex(SelectionDAG & DAG) const; |