Cleanup and remove a chunk of getARMSubtarget calls in the
[oota-llvm.git] / lib / Target / ARM / ARMInstrInfo.cpp
index bc617f08743e011208dc51614e87a8540bb0ea06..732dd2f6ed057616d1c8b9cb7a0c4adb6c89e8b8 100644 (file)
@@ -146,6 +146,10 @@ namespace {
         return false;
       const ARMSubtarget &STI =
           static_cast<const ARMSubtarget &>(MF.getSubtarget());
+      // Don't do this for Thumb1.
+      if (STI.isThumb1Only())
+       return false;
+
       const TargetMachine &TM = MF.getTarget();
       if (TM.getRelocationModel() != Reloc::PIC_)
         return false;