[llvm] [AMDGPU] Machine-CP is deleting incorrect copy instr. (PR #114773)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 02:35:30 PST 2024
cdevadas wrote:
The right fix, in this case, would be to mark only the subregs whose defs are missing (more precisely, mark the implicit-def not in the first instance, but for the final spill instruction inserted for that subreg).
That requires a liveness query for each subregs at the time of inserting the spills for the tuple. The RS at that moment is useless to query and get the correct information because FI elimination currently happens in the backward direction by default (including AMDGPU) and the RegScavenger also marks the reg states backward. They are yet to visit the actual defs of these instructions.
Is there any other way possible to query if a real def of these subregs exist before this spill point?
https://github.com/llvm/llvm-project/pull/114773
More information about the llvm-commits
mailing list