aco/lower_branches: keep blocks with multiple logical successors

It might be the case that both the branch and exec mask write in a
divergent branch block are removed. try_remove_simple_block() might then
try to remove it, but fail because it has multiple logical successors.
Instead, just skip these blocks.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35202>
(cherry picked from commit 5344abbc56)
This commit is contained in:
Rhys Perry 2025-05-22 16:30:46 +01:00 committed by Eric Engestrom
parent bbb75759ef
commit be6ede15eb
2 changed files with 2 additions and 2 deletions

View file

@ -7794,7 +7794,7 @@
"description": "aco/lower_branches: keep blocks with multiple logical successors",
"nominated": true,
"nomination_type": 4,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -553,7 +553,7 @@ lower_branches(Program* program)
if (block.kind & block_kind_break)
try_merge_break_with_continue(ctx, block);
if (block.linear_succs.size() == 1)
if (block.linear_succs.size() == 1 && block.logical_succs.size() <= 1)
try_remove_simple_block(ctx, block);
}