jay/ra: drop memory copy reordering

No shader-db changes, and no longer required for correctness.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41064>
This commit is contained in:
Alyssa Rosenzweig 2026-04-20 13:53:07 -04:00 committed by Marge Bot
parent 45845ea7f2
commit 1f62da938b

View file

@ -642,33 +642,19 @@ jay_emit_parallel_copies(jay_builder *b,
/* Emit moves after swaps because they fan out and thus increase demand.
* This gives us more freedom around temporaries. The rewrite of simple
* copies above ensures correctness.
*
* Simiarly, we first emit memory-memory copies since those require
* temporaries but only register copies can clobber the temporaries.
*/
for (unsigned i = 0; i < num_simple; i++) {
jay_def dst = def_from_reg(simple[i].dst);
jay_def src = def_from_reg(simple[i].src);
if (jay_is_mem(dst) && jay_is_mem(src)) {
mov(b, dst, src, temps);
mov(b, dst, src, temps);
if (temps.gpr == simple[i].dst || temps.gpr == simple[i].src) {
temps.gpr = NO_REG;
}
}
for (unsigned i = 0; i < num_simple; i++) {
jay_def dst = def_from_reg(simple[i].dst);
jay_def src = def_from_reg(simple[i].src);
if (!(jay_is_mem(dst) && jay_is_mem(src))) {
mov(b, dst, src, temps);
if (temps.gpr == simple[i].dst || temps.gpr == simple[i].src) {
temps.gpr = NO_REG;
}
if (temps.ugpr == simple[i].dst || temps.ugpr == simple[i].src) {
temps.ugpr = NO_REG;
}
if (temps.ugpr == simple[i].dst || temps.ugpr == simple[i].src) {
temps.ugpr = NO_REG;
}
}