From b88c8f37e436207bf2e4a2f5817c1643622b6043 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Thu, 5 Mar 2026 17:43:01 -0800 Subject: [PATCH] pan: fix to not clear out of bitset range Fixes: 617f0562bb1 ("pan: Use bitset instead of bool array in bi_find_loop_blocks") Reviewed-by: Christoph Pillmayer (cherry picked from commit ec24d1afb624dcbd7bffe799fad1521a41b38873) Part-of: --- .pick_status.json | 2 +- src/panfrost/compiler/bifrost/bifrost_compile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index a9e99b7c820..94510a398ee 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2114,7 +2114,7 @@ "description": "pan: fix to not clear out of bitset range", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "617f0562bb1127d53841c33d39f743d179064148", "notes": null diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 36a27b3f1f4..344a10948a6 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -7086,7 +7086,7 @@ find_all_predecessors(const bi_context *ctx, bi_block *b, BITSET_WORD *out) assert(out); assert(b); - BITSET_CLEAR_RANGE(out, 0, ctx->num_blocks); + BITSET_CLEAR_COUNT(out, 0, ctx->num_blocks); /* If the CFG was one long chain, we would require |blocks|-1 iters to * propagate the in_loop info all the way through.