pan/bi: Preserve AXCHG.i32 destination

dEQP-GLES31.functional.image_load_store.2d.atomic.exchange_r32f_result

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>
This commit is contained in:
Alyssa Rosenzweig 2022-03-30 15:56:41 -04:00 committed by Marge Bot
parent 20f92871d8
commit 6e2b757bce

View file

@ -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();