From 521525fc0a3b9008e70841542ad6e3db4b1ea4d6 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 2 Jan 2020 14:54:31 +0000 Subject: [PATCH] aco: don't consider loop header blocks branch blocks in add_coupling_code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Loops without continues create header blocks with only 1 predecessor. CC: Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_spill.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index e0c3ea955cd..576b8e02aea 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -665,7 +665,7 @@ void add_coupling_code(spill_ctx& ctx, Block* block, unsigned block_idx) std::vector> instructions; /* branch block: TODO take other branch into consideration */ - if (block->linear_preds.size() == 1 && !(block->kind & block_kind_loop_exit)) { + if (block->linear_preds.size() == 1 && !(block->kind & (block_kind_loop_exit | block_kind_loop_header))) { assert(ctx.processed[block->linear_preds[0]]); assert(ctx.register_demand[block_idx].size() == block->instructions.size()); std::vector reg_demand; -- 2.30.2