aco: fix waitcnts for barriers at block ends
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 22 Nov 2019 19:38:51 +0000 (19:38 +0000)
committerRhys Perry <pendingchaos02@gmail.com>
Fri, 22 Nov 2019 19:56:31 +0000 (19:56 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: d1b9deee ('aco: improve waitcnt insertion around loops')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_insert_waitcnt.cpp

index 725e8914071e6540f01ebd8c4c89a92152869753..f352101364034fd52669912c3db75284e9323457 100644 (file)
@@ -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);
 }