From 517728477cd5b682ea4c2474e73fdb71b449e6f5 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 22 Nov 2019 19:38:51 +0000 Subject: [PATCH] aco: fix waitcnts for barriers at block ends MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Fixes: d1b9deee ('aco: improve waitcnt insertion around loops') Reviewed-by: Daniel Schürmann --- src/amd/compiler/aco_insert_waitcnt.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index 725e8914071..f3521013640 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -729,6 +729,9 @@ void handle_block(Program *program, Block& block, wait_ctx& ctx) } } + if (!queued_imm.empty()) + emit_waitcnt(ctx, new_instructions, queued_imm); + block.instructions.swap(new_instructions); } -- 2.30.2