llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[AMDGPU] rewrite-vgpr-mfma-to-agpr-reserved-wwm-vgpr.ll no longer exercises its fix

Open petar-jovanovic opened this issue 1 month ago • 2 comments

The test (#221849) guards the RegisterClassInfo refresh in AMDGPUReserveWWMRegs. Since #206739 (40c3dc20b72e, StructurizeCFG SkipUniformRegions;), its input has no SGPR spills into v31 and no VGPR spill slots, so the fix is never exercised: removing RCI.updateReservedRegs(...) leaves the output unchanged.

Locally reverting #206739 brings the scenario back; with the fix also removed, the test then hits the VirtRegMap assertion "Attempt to map virtReg to a reserved physReg".

Check: llc -mtriple=amdgpu9.50-amd-amdhsa < rewrite-vgpr-mfma-to-agpr-reserved-wwm-vgpr.ll | grep -c v_writelane_b32 prints 0 (8 before #206739).

petar-jovanovic avatar Oct 29 '26 15:10 petar-jovanovic

@llvm/issue-subscribers-backend-amdgpu

Author: Petar Jovanovic (petar-jovanovic)

The test (#221849) guards the `RegisterClassInfo` refresh in `AMDGPUReserveWWMRegs`. Since #206739 (`40c3dc20b72e`, StructurizeCFG SkipUniformRegions;), its input has no SGPR spills into `v31` and no VGPR spill slots, so the fix is never exercised: removing `RCI.updateReservedRegs(...)` leaves the output unchanged.

Locally reverting #206739 brings the scenario back; with the fix also removed, the test then hits the VirtRegMap assertion "Attempt to map virtReg to a reserved physReg".

Check: llc -mtriple=amdgpu9.50-amd-amdhsa &lt; rewrite-vgpr-mfma-to-agpr-reserved-wwm-vgpr.ll | grep -c v_writelane_b32 prints 0 (8 before #206739).

@mhalk Can you take a look? cc: @jayfoad

petar-jovanovic avatar Oct 29 '26 22:10 petar-jovanovic