Disable constant-offset folding for PowerPC, as the PowerPC target
authorDan Gohman <gohman@apple.com>
Tue, 21 Oct 2008 03:41:46 +0000 (03:41 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 21 Oct 2008 03:41:46 +0000 (03:41 +0000)
isn't yet prepared for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57886 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h

index 553ca107ecf1e4616171f6e8681e0dad843c7f01..eb327dcdf23e61245848bf3946f8b8e46dc500b4 100644 (file)
@@ -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;
+}
index fa689de058ca23250d46ff4c7c3b1926f5d4487d..00f707dd5a2eceef36ce7f3f1acbdc6c14b1019e 100644 (file)
@@ -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;