[all-commits] [llvm/llvm-project] 3ff9ab: [LFI][AArch64] Do not flush deferred LR guards on ...
Sharjeel Khan via All-commits
all-commits at lists.llvm.org
Fri Sep 18 20:31:05 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ff9abe8930acc7b4c4e2387c1357ca6f2d15c00
https://github.com/llvm/llvm-project/commit/3ff9abe8930acc7b4c4e2387c1357ca6f2d15c00
Author: Sharjeel Khan <sharjeelkhan at google.com>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
M llvm/test/MC/AArch64/LFI/guard-elim.s
M llvm/test/MC/AArch64/LFI/return.s
Log Message:
-----------
[LFI][AArch64] Do not flush deferred LR guards on temporary labels (#224776)
In function epilogues with unwinding enabled, DWARF CFI directives
between restoring x30 and autiasp trigger
MCObjectStreamer::emitCFILabel, which emits temporary labels. onLabel
assumed all labels were branch targets and flushed DeferredLRGuard,
emitting `add x30, x27, w30, uxtw` before autiasp. Because w30
zero-extends, this stripped the PAC signature from x30 and caused PAC
exceptions on hardware with FEAT_FPAC.
Fix it by not flushing the deferred LR guard on temporary symbols in
onLabel. Also, update AArch64InstrInfo::getLFIInstSizeInBytes to return
8 for RET to fix the size assertion failure in +assertions builds, which
occurs because RET did not account for the deferred LR guard that can
precede the return instruction.
Assisted-by: Gemini
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list