diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 15e61c9dca9..0671e1a92b5 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -4056,6 +4056,7 @@ emit_loop(bi_context *ctx, nir_loop *nloop) ctx->continue_block = create_empty_block(ctx); ctx->break_block = create_empty_block(ctx); ctx->after_block = ctx->continue_block; + ctx->after_block->loop_header = true; /* Emit the body itself */ emit_cf_list(ctx, &nloop->body); diff --git a/src/panfrost/compiler/compiler.h b/src/panfrost/compiler/compiler.h index a1820bef041..4c708b4c041 100644 --- a/src/panfrost/compiler/compiler.h +++ b/src/panfrost/compiler/compiler.h @@ -713,6 +713,7 @@ typedef struct bi_block { struct bi_block *successors[2]; struct util_dynarray predecessors; bool unconditional_jumps; + bool loop_header; /* Per 32-bit word live masks for the block indexed by node */ uint8_t *live_in;