[ARM] Use the load-acquire/store-release instructions optimally in AArch32.
[oota-llvm.git] / lib / Target / ARM / ARMBaseRegisterInfo.cpp
index 9274baf1198262d68fb7eb1b57f2651f26e32ad0..58c06e392cf00a3c3713905bf4e1c7bd999da074 100644 (file)
@@ -323,7 +323,7 @@ bool ARMBaseRegisterInfo::canRealignStack(const MachineFunction &MF) const {
   // 1. Dynamic stack realignment is explicitly disabled,
   // 2. This is a Thumb1 function (it's not useful, so we don't bother), or
   // 3. There are VLAs in the function and the base pointer is disabled.
-  if (!MF.getTarget().Options.RealignStack)
+  if (MF.getFunction()->hasFnAttribute("no-realign-stack"))
     return false;
   if (AFI->isThumb1OnlyFunction())
     return false;