[llvm] [CodeGen][AMDGPU] TwoAddress: Only skip undef COPY at REG_SEQUENCE lowering when there is Live info or no uses for subreg (PR #175598)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 22 11:13:21 PST 2026
================
@@ -2006,16 +2006,33 @@ void TwoAddressInstructionImpl::eliminateRegSequence(
}
}
+ // If there are no live intervals information, we scan the use list once
+ // in order to find which subregisters are used.
+ LaneBitmask UsedLanes = LaneBitmask::getNone();
+ if (!LIS) {
+ for (MachineOperand &Use : MRI->use_nodbg_operands(DstReg)) {
+ auto SubReg = Use.getSubReg();
+ if (SubReg) {
+ UsedLanes |= TRI->getSubRegIndexLaneMask(SubReg);
+ }
----------------
arsenm wrote:
Whole use of the register counts as LaneBitmask::getAll and break
https://github.com/llvm/llvm-project/pull/175598
More information about the llvm-commits
mailing list