[llvm] [AMDGPU] PeepholeOptimizer - continue search next new source if a new source found is a subreg (PR #212563)

Frederik Harwath via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 06:16:29 PDT 2026


https://github.com/frederik-h commented:

@yoonseoch Do you think we can restrict the detrimental effect of the live range extension seen in spill-vgpr.ll in some way? In this case, we have a very wide REG_SEQUENCE (32 subregs) and the optimization extends the live ranges of several sources. I have modified the code to skip over REG_SEQUENCEs with "many" subregisters (16, which is a quite arbitrary value) that have sources which could be picked by findNextSource and which have at least one use and this fixes the regression in spill-vgpr.ll but keeps the optimizations from your new test file.

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


More information about the llvm-commits mailing list