[llvm] AArch64: Mark status flag clobbers dead in SME ABI pass (PR #228042)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:59:22 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
----------------
arsenm wrote:
The comment says this:
```
// The MRS is set as a NZCV setting instruction. Not all MRS instructions
// require doing this. The alternative was to explicitly model each one, but
// it feels like it is unnecessary because it seems there are no negative
// consequences setting these flags for all.
```
https://github.com/llvm/llvm-project/pull/228042
More information about the llvm-commits
mailing list