From 6e2b757bce84b348a08c44708ad8b09a78ee7bf0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 30 Mar 2022 15:56:41 -0400 Subject: [PATCH] pan/bi: Preserve AXCHG.i32 destination dEQP-GLES31.functional.image_load_store.2d.atomic.exchange_r32f_result Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_opt_dce.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/panfrost/bifrost/bi_opt_dce.c b/src/panfrost/bifrost/bi_opt_dce.c index 38f2537a74f..dc725d0d8e5 100644 --- a/src/panfrost/bifrost/bi_opt_dce.c +++ b/src/panfrost/bifrost/bi_opt_dce.c @@ -49,6 +49,13 @@ bi_opt_dead_code_eliminate(bi_context *ctx) bi_foreach_dest(ins, d) { unsigned index = bi_get_node(ins->dest[d]); + /* Destination required */ + if (ins->op == BI_OPCODE_AXCHG_I32 || + ins->op == BI_OPCODE_ACMPXCHG_I32 || + ins->op == BI_OPCODE_ATOM_RETURN_I32 || + ins->op == BI_OPCODE_ATOM1_RETURN_I32) + continue; + if (index < temp_count && !(live[index] & bi_writemask(ins, d))) ins->dest[d] = bi_null();