[llvm] [AArch64][SME] Don't mark 'smstart za' as using/defining VG. (PR #84775)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 10:09:16 PDT 2024
================
@@ -7751,13 +7751,23 @@ void AArch64TargetLowering::AdjustInstrPostInstrSelection(MachineInstr &MI,
// register allocator to pass call args in callee saved regs, without extra
// copies to avoid these fake clobbers of actually-preserved GPRs.
if (MI.getOpcode() == AArch64::MSRpstatesvcrImm1 ||
- MI.getOpcode() == AArch64::MSRpstatePseudo)
+ MI.getOpcode() == AArch64::MSRpstatePseudo) {
for (unsigned I = MI.getNumOperands() - 1; I > 0; --I)
if (MachineOperand &MO = MI.getOperand(I);
MO.isReg() && MO.isImplicit() && MO.isDef() &&
(AArch64::GPR32RegClass.contains(MO.getReg()) ||
AArch64::GPR64RegClass.contains(MO.getReg())))
MI.removeOperand(I);
+ // If the instruction or pseudo changes PSTATE.SM, then add VG as a Use and
+ // Def.
----------------
paulwalker-arm wrote:
Whilst true it's effectively what the code says. Perhaps "The SVE vector length can change when entering/leaving streaming mode."?
https://github.com/llvm/llvm-project/pull/84775
More information about the llvm-commits
mailing list