[llvm] [AMDGPU] Do not forward reserved aperture registers into wider copies (PR #220517)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 01:53:55 PDT 2026
================
@@ -879,6 +893,14 @@ void MachineCopyPropagation::forwardUses(MachineInstr &MI) {
if (MRI->isReserved(CopySrc) && !MRI->isConstantPhysReg(CopySrc))
continue;
+ // A reserved source may lack subregs the copy is later split into.
+ if (MRI->isReserved(CopySrc) && isCopyInstr(MI, *TII, UseCopyInstr) &&
----------------
arsenm wrote:
The reserved part shouldn't matter, it just happens this AMDGPU case involves a reserved register. You may be able to craft a similar case using SGPRs with true16?
https://github.com/llvm/llvm-project/pull/220517
More information about the llvm-commits
mailing list