[llvm] [AMDGPU] Only legalize PHIs in SIFixSGPRCopies that need it (PR #226213)
Pablo Reble via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 09:58:04 PDT 2026
================
@@ -7765,6 +7765,17 @@ SIInstrInfo::legalizeOperands(MachineInstr &MI,
if (!Op.isReg() || !Op.getReg().isVirtual())
continue;
+ // No copy is needed if the classes differ only in AV-ness, e.g. an av_32
----------------
reble wrote:
Rework done in 10cd916. I dropped the special case in `legalizeOperands`;
`processPHINode` now only legalizes PHIs that need it, so PHIs that are VALU from the start are left alone.
I also tested with CK on gfx90a (291 problems, ~26k instance runs): no new failures, and best-instance time is neutral (geomean 1.000). Spills in max-pressure MFMA kernels move both ways, net down (−3.6k).
https://github.com/llvm/llvm-project/pull/226213
More information about the llvm-commits
mailing list