Mesa (main): pan/bi: Preserve AXCHG.i32 destination

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 11 22:15:08 UTC 2022


Module: Mesa
Branch: main
Commit: 6e2b757bce84b348a08c44708ad8b09a78ee7bf0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e2b757bce84b348a08c44708ad8b09a78ee7bf0

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Wed Mar 30 15:56:41 2022 -0400

pan/bi: Preserve AXCHG.i32 destination

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

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

---

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



More information about the mesa-commit mailing list