From ba82a1676163cf791fc3c500be90db3d7fc813a7 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 11 Feb 2026 11:52:54 +0000 Subject: [PATCH] aco: resolve hazards before calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Backport-to: 26.0 Reviewed-by: Daniel Schürmann (cherry picked from commit 613b4fe407e9cbd6d27f0ac8c28cc2c23c02f640) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/aco_insert_NOPs.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7bbcaad2aa3..d16a0cad2d6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -644,7 +644,7 @@ "description": "aco: resolve hazards before calls", "nominated": true, "nomination_type": 4, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/aco_insert_NOPs.cpp b/src/amd/compiler/aco_insert_NOPs.cpp index 2066314ae35..d832560b89b 100644 --- a/src/amd/compiler/aco_insert_NOPs.cpp +++ b/src/amd/compiler/aco_insert_NOPs.cpp @@ -1914,7 +1914,9 @@ handle_block(Program* program, Ctx& ctx, Block& block) Handle(state, ctx, instr, block.instructions); /* Resolve all possible hazards (we don't know what s_setpc_b64 jumps to). */ - if (instr->opcode == aco_opcode::s_setpc_b64) { + if (instr->opcode == aco_opcode::s_setpc_b64 || instr->opcode == aco_opcode::s_swappc_b64 || + instr->opcode == aco_opcode::s_call_b64) { + found_end |= instr->opcode == aco_opcode::s_setpc_b64; block.instructions.emplace_back(std::move(instr)); std::vector> resolve_instrs; @@ -1922,8 +1924,6 @@ handle_block(Program* program, Ctx& ctx, Block& block) block.instructions.insert(std::prev(block.instructions.end()), std::move_iterator(resolve_instrs.begin()), std::move_iterator(resolve_instrs.end())); - - found_end = true; continue; }