From aafb49f56b0cbb5c111dcd76d9bd1ababeb9568d Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 13 Aug 2024 15:44:19 +0100 Subject: [PATCH] aco: set prefer_remove for gfx9- too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a hint that the branch is worth removing. Assume that's the case, regardless of the gfx level. fossil-db (vega10): Totals from 22 (0.03% of 63053) affected shaders: Instrs: 23927 -> 23856 (-0.30%) CodeSize: 125096 -> 124812 (-0.23%) Latency: 138258 -> 137765 (-0.36%) InvThroughput: 55900 -> 55884 (-0.03%) Branches: 391 -> 320 (-18.16%) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_lower_to_hw_instr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp index 428149ebc55..6d0876f9bb1 100644 --- a/src/amd/compiler/aco_lower_to_hw_instr.cpp +++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp @@ -2837,7 +2837,7 @@ lower_to_hw_instr(Program* program) * - The application prefers to remove control flow * - The compiler stack knows that it's a divergent branch always taken */ - const bool prefer_remove = branch->rarely_taken && ctx.program->gfx_level >= GFX10; + const bool prefer_remove = branch->rarely_taken; bool can_remove = block->index < target; unsigned num_scalar = 0; unsigned num_vector = 0;