From e110eac1711d958e96d385ec6c2189ff74e84d8b Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 27 Sep 2023 18:52:43 +0100 Subject: [PATCH] aco: insert p_end_wqm before p_jump_to_epilog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise, we can transition to exact before p_jump_to_epilog, then transition to WQM again and then back to exact: p_jump_to_epilog //transitions to exact p_logical_end //transitions to wqm p_end_wqm //transitions to exact We rely on ssa elimination to clean most of this up. fossil-db (navi21): Totals from 1 (0.00% of 79330) affected shaders: Instrs: 111 -> 110 (-0.90%) CodeSize: 572 -> 568 (-0.70%) Copies: 16 -> 15 (-6.25%) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index fe11ad16a23..82bc354ec1b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -11441,6 +11441,7 @@ finish_program(isel_context* ctx) /* End WQM before: */ if (instr->isVMEM() || instr->isFlatLike() || instr->isDS() || instr->isEXP() || instr->opcode == aco_opcode::p_dual_src_export_gfx11 || + instr->opcode == aco_opcode::p_jump_to_epilog || instr->opcode == aco_opcode::p_logical_start) break;