[llvm] [AArch64] Fix stack probing clobbering flags (PR #81879)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 10:18:18 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))
----------------
efriedma-quic wrote:
x86 already has a similar check for EFLAGS. (Not specific to stack probing there, because almost all prologues end up clobbering the flags.)
https://github.com/llvm/llvm-project/pull/81879
More information about the llvm-commits
mailing list