[llvm] [PHIElim][AMDGPU]: shrink source subranges to lane-specific uses (PR #228073)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:36:47 PDT 2026
================
@@ -306,6 +311,19 @@ bool PHIEliminationImpl::run(MachineFunction &MF) {
}
LoweredPHIs.clear();
+
+ // Different lanes may be used by different PHI source copies, or may already
+ // be dead in a predecessor. The main range's last use is therefore not a
+ // valid endpoint for every subrange. Wait until all PHIs have been removed
+ // before shrinking subranges to their remaining lane-specific uses.
+ for (Register Reg : PHISrcRegsToShrink) {
----------------
arsenm wrote:
This looks like the brute force version of #226209
https://github.com/llvm/llvm-project/pull/228073
More information about the llvm-commits
mailing list