From 30debe18b6d2571fc83e6498a002f20c46764cdd Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 10 Feb 2026 11:06:50 +0100 Subject: [PATCH] aco/lower_branches: consider jump target of conditional branches based on vcc Cc: mesa-stable Reviewed-by: Rhys Perry (cherry picked from commit 421a4dacf002f3bf73f7e04d46198de7e75dbde7) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/aco_lower_branches.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1ebe4c23812..55b07789f59 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -64,7 +64,7 @@ "description": "aco/lower_branches: consider jump target of conditional branches based on vcc", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/aco_lower_branches.cpp b/src/amd/compiler/aco_lower_branches.cpp index 8fb1f02c4a8..a9b73700384 100644 --- a/src/amd/compiler/aco_lower_branches.cpp +++ b/src/amd/compiler/aco_lower_branches.cpp @@ -298,7 +298,9 @@ eliminate_useless_exec_writes_in_block(branch_ctx& ctx, Block& block) /* blocks_incoming_exec_used is initialized to true, so this is correct even for loops. */ if (instr->opcode == aco_opcode::s_cbranch_scc0 || - instr->opcode == aco_opcode::s_cbranch_scc1) { + instr->opcode == aco_opcode::s_cbranch_scc1 || + instr->opcode == aco_opcode::s_cbranch_vccz || + instr->opcode == aco_opcode::s_cbranch_vccnz) { exec_write_used |= ctx.blocks_incoming_exec_used[instr->salu().imm]; }