Cleanup and remove a chunk of getARMSubtarget calls in the
[oota-llvm.git] / lib / Target / ARM / MLxExpansionPass.cpp
index 51e519d6d3bc39940a9d5f9d3f9523987513e514..ed2deeaa24c09ae23ee9f32eed2a0fec8e653998 100644 (file)
@@ -382,6 +382,9 @@ bool MLxExpansion::runOnMachineFunction(MachineFunction &Fn) {
   TRI = Fn.getSubtarget().getRegisterInfo();
   MRI = &Fn.getRegInfo();
   const ARMSubtarget *STI = &Fn.getSubtarget<ARMSubtarget>();
+  // Only run this for CortexA9.
+  if (!STI->isCortexA9())
+    return false;
   isLikeA9 = STI->isLikeA9() || STI->isSwift();
   isSwift = STI->isSwift();