diff options
author | Daniel Schürmann <[email protected]> | 2019-09-19 18:48:01 +0200 |
---|---|---|
committer | Daniel Schürmann <[email protected]> | 2019-09-23 13:39:33 +0200 |
commit | 2c050b49b3d776f054f1265d5523cabb61f22fc3 (patch) | |
tree | 6a46b96d921d24ebbd7d5920e4ad72e0d6ae97d7 /src/amd/compiler | |
parent | 70e39294d7084a3803c00950de483497cc39fe6b (diff) |
aco: only emit waitcnt on loop continues if we there was some load or export
Reviewed-by: Rhys Perry <[email protected]>
Diffstat (limited to 'src/amd/compiler')
-rw-r--r-- | src/amd/compiler/aco_insert_waitcnt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index d19fdadadea..9bd9f06e6c2 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -648,7 +648,7 @@ void handle_block(Program *program, Block& block, wait_ctx& ctx) /* check if this block is at the end of a loop */ for (unsigned succ_idx : block.linear_succs) { /* eliminate any remaining counters */ - if (succ_idx <= block.index && (ctx.vm_cnt || ctx.exp_cnt || ctx.lgkm_cnt || ctx.vs_cnt)) { + if (succ_idx <= block.index && (ctx.vm_cnt || ctx.exp_cnt || ctx.lgkm_cnt || ctx.vs_cnt) && !ctx.gpr_map.empty()) { // TODO: we could do better if we only wait if the regs between the block and other predecessors differ aco_ptr<Instruction> branch = std::move(new_instructions.back()); |