This can come up with loops with SPIR-V. Fixes:
dEQP-VK.spirv_assembly.instruction.compute.loop_control.none
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
static void
reserve_live_in(struct ra_ctx *rctx)
{
+ /* If there are no predecessors, there is nothing live-in */
unsigned nr_preds = agx_num_predecessors(rctx->block);
+ if (nr_preds == 0)
+ return;
+
agx_builder b =
agx_init_builder(rctx->shader, agx_before_block(rctx->block));