From c11c4d8d4c1c862883652b24c26365e9772d8e54 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 3 Apr 2020 17:44:47 +0100 Subject: [PATCH] aco: fix copy of uninitialized boolean This should be harmless but UBSan seems to complain. Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_insert_waitcnt.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index 196b45fbb75..aedcad1b573 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -293,7 +293,8 @@ struct wait_ctx { max_exp_cnt(6), max_lgkm_cnt(program_->chip_class >= GFX10 ? 62 : 14), max_vs_cnt(program_->chip_class >= GFX10 ? 62 : 0), - unordered_events(event_smem | (program_->chip_class < GFX10 ? event_flat : 0)) {} + unordered_events(event_smem | (program_->chip_class < GFX10 ? event_flat : 0)), + collect_statistics(program_->collect_statistics) {} bool join(const wait_ctx* other, bool logical) { @@ -847,8 +848,6 @@ void handle_block(Program *program, Block& block, wait_ctx& ctx) wait_imm queued_imm; - ctx.collect_statistics = program->collect_statistics; - for (aco_ptr& instr : block.instructions) { bool is_wait = !parse_wait_instr(ctx, instr.get()).empty(); -- 2.30.2