[AMDGPU] unspill-vgpr-after-rewrite-vgpr-mfma.ll: x2 case no longer eliminates spills
Since SlotIndexes compaction became the AMDGPU default (#235806), @eliminate_spill_after_mfma_rewrite_x2 no longer does what its comment says ("fold out 2 spills from %spill0 and %spill1"). AMDGPURewriteAGPRCopyMFMAnow eliminates no spills (2 before). The test still passes because its checks are autogenerated.
Not a miscompile: the code is better (56 spill stores instead of 80), because greedy now keeps one of the two 1024-bit tuples in registers.
Reproduce (add -greedy-compact-slot-indexes=false for the old behaviour):
llc -mtriple=amdgpu9.0a-amd-amdhsa -amdgpu-mfma-vgpr-form \
-debug-only=amdgpu-rewrite-agpr-copy-mfma -filetype=null \
unspill-vgpr-after-rewrite-vgpr-mfma.ll 2>&1 | grep -c '^Reassigning SS#'
Recommendation: Update the x2 comment to describe the current behaviour. Successful elimination is still covered by the
rewrite-vgpr-mfma-to-agpr-spill-multi-store tests.
@arsenm do you agree with the proposal or would suggest something different?
@llvm/issue-subscribers-backend-amdgpu
Author: Petar Jovanovic (petar-jovanovic)
Not a miscompile: the code is better (56 spill stores instead of 80), because greedy now keeps one of the two 1024-bit tuples in registers.
Reproduce (add -greedy-compact-slot-indexes=false for the old behaviour):
llc -mtriple=amdgpu9.0a-amd-amdhsa -amdgpu-mfma-vgpr-form \
-debug-only=amdgpu-rewrite-agpr-copy-mfma -filetype=null \
unspill-vgpr-after-rewrite-vgpr-mfma.ll 2>&1 | grep -c '^Reassigning SS#'
any comments @arsenm ?