[llvm] AArch64: Mark status flag clobbers dead in SME ABI pass (PR #228042)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:34:15 PDT 2026
================
@@ -767,7 +767,8 @@ PhysRegSave MachineSMEABI::createPhysRegSave(LiveRegs PhysLiveRegs,
RegSave.StatusFlags = MRI->createVirtualRegister(&AArch64::GPR64RegClass);
BuildMI(MBB, MBBI, DL, TII->get(AArch64::MRS), RegSave.StatusFlags)
.addImm(AArch64SysReg::NZCV)
- .addReg(AArch64::NZCV, RegState::Implicit);
+ .addReg(AArch64::NZCV, RegState::Implicit)
+ .setOperandDead(2); // implicit-def $nzcv
----------------
MacDue wrote:
I'm fairly sure MRS also does not define nzcv (here we're reading it, so this looks odd). Not sure how hard it is to fix-up this instruction though.
https://github.com/llvm/llvm-project/pull/228042
More information about the llvm-commits
mailing list