ARM does not support offset folding (yet). Disable it for now.
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 23 Sep 2009 19:04:09 +0000 (19:04 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 23 Sep 2009 19:04:09 +0000 (19:04 +0000)
This fixes PR5031. Unfortunately, there is no small testcase :(

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

lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h

index df9f29644b182a605483f58fae04750358035cff..a656ef93fe7fd12951aaafbd10e04fae2d6f8998 100644 (file)
@@ -4073,3 +4073,9 @@ void ARMTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
   return TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, hasMemory,
                                                       Ops, DAG);
 }
+
+bool
+ARMTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
+  // The ARM target isn't yet aware of offsets.
+  return false;
+}
index 94dcf0d6bc5110e76be063f67531a24eba52f5ba..7d85f458d8e9f8341543baae32d5c9658237f91d 100644 (file)
@@ -223,6 +223,7 @@ namespace llvm {
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
     bool isShuffleMaskLegal(const SmallVectorImpl<int> &M, EVT VT) const;
+    bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
   private:
     /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
     /// make the right decision when generating code for different targets.