From 13191efa86da99498358528e2789b9d0f7e9e7e2 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 27 Sep 2024 10:20:23 -0400 Subject: [PATCH] agx: assert a subtle invariant we should probably be more explicit about this ... 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 f2dcc33e774..7efb5fdf78f 100644 --- a/src/asahi/compiler/agx_register_allocate.c +++ b/src/asahi/compiler/agx_register_allocate.c @@ -835,6 +835,7 @@ reserve_live_in(struct ra_ctx *rctx) * particular predecessor. That means that such a register allocation * is valid here, because it was valid in the predecessor. */ + assert(phi->src[0].type == AGX_INDEX_REGISTER && "not loop source"); phi->dest[0] = phi->src[0]; base = phi->dest[0].value; } else {