From 0c0143a4c0477ce092bb4cd3ab1667e057cbb5e7 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 7 Jun 2023 17:00:12 +0100 Subject: [PATCH] aco: don't try to form load+store clauses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fossil-db (gfx1100): Totals from 79 (0.06% of 133428) affected shaders: MaxWaves: 1484 -> 1408 (-5.12%) Instrs: 216290 -> 216255 (-0.02%); split: -0.04%, +0.03% CodeSize: 1149288 -> 1149148 (-0.01%); split: -0.03%, +0.02% VGPRs: 7384 -> 7840 (+6.18%) Latency: 3303521 -> 3305077 (+0.05%); split: -0.05%, +0.10% InvThroughput: 2716621 -> 2719973 (+0.12%); split: -0.01%, +0.13% VClause: 5605 -> 6170 (+10.08%) SClause: 3005 -> 2983 (-0.73%); split: -0.77%, +0.03% Copies: 33428 -> 33490 (+0.19%); split: -0.07%, +0.26% Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_ir.cpp | 3 +++ src/amd/compiler/tests/test_hard_clause.cpp | 22 --------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index f552cc2f3c7..ea5e1f229d6 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -1277,6 +1277,9 @@ wait_imm::empty() const bool should_form_clause(const Instruction* a, const Instruction* b) { + if (a->definitions.empty() != b->definitions.empty()) + return false; + if (a->format != b->format) return false; diff --git a/src/amd/compiler/tests/test_hard_clause.cpp b/src/amd/compiler/tests/test_hard_clause.cpp index 7e61b87c491..c9e26a070b8 100644 --- a/src/amd/compiler/tests/test_hard_clause.cpp +++ b/src/amd/compiler/tests/test_hard_clause.cpp @@ -355,27 +355,5 @@ BEGIN_TEST(form_hard_clauses.stores) create_mubuf_store(); create_mubuf(); - /* Unimportant pass limitations */ - //>> p_unit_test 4 - //; search_re('buffer_store_dword') - //! s_clause imm:61 - //; for i in range(62): - //; search_re('buffer_load_dword') - //; search_re('buffer_load_dword') - bld.pseudo(aco_opcode::p_unit_test, Operand::c32(4u)); - create_mubuf_store(); - for (unsigned i = 0; i < 63; i++) - create_mubuf(); - - //>> p_unit_test 5 - //! s_clause imm:62 - //; for i in range(63): - //; search_re('buffer_load_dword') - //; search_re('buffer_store_dword') - bld.pseudo(aco_opcode::p_unit_test, Operand::c32(5u)); - for (unsigned i = 0; i < 63; i++) - create_mubuf(); - create_mubuf_store(); - finish_form_hard_clause_test(); END_TEST