agx: Assert invariant stated in the comment
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 1 Aug 2023 13:07:31 +0000 (09:07 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:28 +0000 (20:31 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>

src/asahi/compiler/agx_register_allocate.c

index 7802dfe..2b10373 100644 (file)
@@ -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 */