freedreno/ir3/a6xx: fix non-ssa atomic dst
authorRob Clark <robdclark@gmail.com>
Mon, 25 Feb 2019 19:22:04 +0000 (14:22 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 26 Feb 2019 18:19:44 +0000 (13:19 -0500)
We weren't propagating the array info for cases where result of atomic
is array/reg.  This can happen, for example, if result is part of a phi
web lowered to regs.

Fixes dEQP-GLES31.functional.ssbo.atomic.compswap.*

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3_a6xx.c

index 1a10b63edb25245b6f408485a8caf6859f121df9..3bb9e3496f4fb45cedfb05c83f52cfe03a03ed02 100644 (file)
@@ -374,6 +374,11 @@ get_atomic_dest_mov(struct ir3_instruction *atomic)
 
        mov->flags |= IR3_INSTR_SY;
 
+       if (atomic->regs[0]->flags & IR3_REG_ARRAY) {
+               mov->regs[0]->flags |= IR3_REG_ARRAY;
+               mov->regs[0]->array = atomic->regs[0]->array;
+       }
+
        /* it will have already been appended to the end of the block, which
         * isn't where we want it, so fix-up the location:
         */