jay: elide atomic dests

simd16 results. kinda noisy but obviously the right thing to do.

Totals from 45 (1.70% of 2647) affected shaders:
Instrs: 59182 -> 59194 (+0.02%); split: -0.11%, +0.14%
CodeSize: 905200 -> 904752 (-0.05%); split: -0.17%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
This commit is contained in:
Alyssa Rosenzweig 2026-05-12 09:09:18 -04:00 committed by Marge Bot
parent b3fe01e2c1
commit 5ebf0c9161

View file

@ -1014,6 +1014,13 @@ jay_emit_mem_access(struct nir_to_jay_state *nj, nir_intrinsic_instr *intr)
lsc_bits_to_data_size(ndata->bit_size),
cmask ? BITFIELD_MASK(nr) : nr, transpose, cache);
/* Unlike most SENDs, we may skip the destination of atomics. We do this here
* instead of DCE so we don't need to fix up message descriptors later.
*/
if (nir_intrinsic_has_atomic_op(intr) && nir_def_is_unused(&intr->def)) {
dst = jay_null();
}
jay_def tmp = dst;
if (dst.file == UGPR) {