[llvm] [AMDGPU] Extend wide VGPR copy expansion to 96-bit copies (PR #214561)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 09:51:34 PDT 2026
================
@@ -1178,6 +1177,59 @@ void SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
}
}
+ // If there is an overlap, we can't kill the super-register on the last
+ // instruction, since it will also kill the components made live by this def.
+ const bool Overlap = RI.regsOverlap(SrcReg, DestReg);
+ const bool CanKillSuperReg = KillSrc && !Overlap;
+
+ if (ST.hasVMovB64Inst() && AMDGPU::VReg_96RegClass.hasSubClassEq(RC) &&
----------------
shiltian wrote:
It looks weird that we need to special case 96-bit here and then do . Does it make more sense to just handle it more generally, like we always emit 64-bit copy if the remaining is >= 64-bit, and then special the remain when it is 16-bit?
https://github.com/llvm/llvm-project/pull/214561
More information about the llvm-commits
mailing list