From 74fc2e287fc79b9451919b21957bc5d0ef186a5a Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 17 Jan 2024 17:01:58 +0100 Subject: [PATCH] aco: stop scheduling at p_logical_end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No Foz-DB changes, but this fixes some issues when the spiller inserts scratch loads after p_logical_end for p_return. Reviewed-by: Daniel Schürmann Cc: mesa-stable Part-of: --- src/amd/compiler/aco_scheduler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index f4cebf7a493..b3302dfb715 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -1087,6 +1087,9 @@ schedule_block(sched_ctx& ctx, Program* program, Block* block, live& live_vars) for (unsigned idx = 0; idx < block->instructions.size(); idx++) { Instruction* current = block->instructions[idx].get(); + if (current->opcode == aco_opcode::p_logical_end) + break; + if (block->kind & block_kind_export_end && current->isEXP() && ctx.schedule_pos_exports) { unsigned target = current->exp().dest; if (target >= V_008DFC_SQ_EXP_POS && target < V_008DFC_SQ_EXP_PRIM) {