Skip to content

ir3/spill: Fix extracting from a vector at the end of a block

If this happens then "after" is NULL, so we can't use it to get the block, and the instruction is never moved at the end so we have to create the split instructions before creating the collect to make sure they are in the right order.

This happens when reloading a complex vector value that has been coalesced at the end of a basic block, which apparently hasn't happened until a gfxbench5 shader on zink hit this case. This fixes it.

Closes: #7054 (closed) Fixes: 613eaac7 ("ir3: Initial support for spilling non-shared registers")

Merge request reports