aco/lower_branches: update branch hints after changing jump targets

Fixes: 13ad3db43f ("aco/lower_branches: implement try_remove_simple_block() in lower_branches()")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37552>
This commit is contained in:
Georg Lehmann
2025-09-26 13:31:59 +02:00
committed by Marge Bot
parent 2ea551e85a
commit 8343e45467
+4
View File
@@ -68,6 +68,8 @@ try_remove_simple_block(branch_ctx& ctx, Block& block)
pred.linear_succs[1] = pred.linear_succs.back(); /* In case of discard */
pred.linear_succs.pop_back();
branch->opcode = aco_opcode::p_branch;
branch->branch().never_taken = false;
branch->branch().rarely_taken = false;
} else if (pred.linear_succs[1] == block.index) {
/* The predecessor jumps to this block. Redirect to successor. */
pred.linear_succs[1] = succ_idx;
@@ -105,6 +107,8 @@ try_remove_simple_block(branch_ctx& ctx, Block& block)
branch->opcode = aco_opcode::p_cbranch_z;
else
branch->opcode = aco_opcode::p_cbranch_nz;
branch->branch().never_taken = false;
branch->branch().rarely_taken = false;
}
/* Update the branch target. */