[llvm] [AArch64] Fix stack probing clobbering flags (PR #81879)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 10:08:34 PST 2024


================
@@ -1058,9 +1058,14 @@ bool AArch64FrameLowering::canUseAsPrologue(
       return false;
   }
 
+  // Certain stack probing sequences might clobber flags, then we can't use
+  // the block as a prologue if the flags register is a live-in.
+  if (TLI->hasInlineStackProbe(*MF) && MBB.isLiveIn(AArch64::NZCV))
----------------
yozhu wrote:

Do we need to add similar logic for X86 targeting, for which stack probing is also supported?

https://github.com/llvm/llvm-project/pull/81879


More information about the llvm-commits mailing list