You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eliminate redundant G_AMDGPU_READANYLANE (selected as v_readfirstlane_b32)
that only round-trips a uniform value through the VGPR/SGPR banks.
Two complementary changes:
- AMDGPURegBankCombiner: add a combine that replaces a
G_AMDGPU_READANYLANE whose source is already uniform (an sgpr value
merely copied into a vgpr) with the original sgpr value.
- AMDGPURegBankLegalize: extend tryMatchMergeReadAnyLane to handle
merges with mixed sources. When at least one source is a readanylane,
the merge is rebuilt entirely in the vgpr bank, using each
readanylane's vgpr operand directly and copying the plain uniform
sources into vgpr. This removes the sgpr -> vgpr -> sgpr -> vgpr
round trip for patterns like build_vector(readanylane(x), uniform_y)
feeding a vector ALU op.
Regenerate affected check lines in packed-fp32.ll and mul.ll and add a
MIR test for the new combine.
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments