[llvm] [WIP][AMDGPU][CopyPhysReg] Expand the COPY instructions using the encoded liveness mask. (PR #151124)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 00:48:05 PST 2025


jayfoad wrote:

> This patch utilizes the liveness encoded during VirtRegRewriter within the COPY instruction[#151123 ] to expand only defined parts of the use register. It enables us to stop using implicit and implicit-def tom satisfy the MachineVerifier, thus avoiding unnecessary false dependency among the registers. This is in reference to [SWDEV-498533](https://ontrack-internal.amd.com/browse/SWDEV-498533)

I don't understand the overall plan here. It seems like this would only work correctly if liveness does not change between VirtRegRewriter and ExpandPostRAPseudos. But lots of passes run in that window, including ones like MachineLICM that can make major code changes.

https://github.com/llvm/llvm-project/pull/151124


More information about the llvm-commits mailing list