From 964a67fda4cab3f4867adf7321128a22df6a5e03 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 1 Aug 2023 09:07:31 -0400 Subject: [PATCH] agx: Assert invariant stated in the comment Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_register_allocate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/asahi/compiler/agx_register_allocate.c b/src/asahi/compiler/agx_register_allocate.c index 7802dfe98b0..2b103737979 100644 --- a/src/asahi/compiler/agx_register_allocate.c +++ b/src/asahi/compiler/agx_register_allocate.c @@ -689,6 +689,7 @@ reserve_live_in(struct ra_ctx *rctx) * it in until the end of the loop. Stash in the information * we'll need to fill in the real register later. */ + assert(rctx->block->loop_header); phi->src[pred_idx] = agx_get_index(i, size); } else { /* Otherwise, we can build the phi now */