freedreno/ir3: fix cp cmps.s opt
authorRob Clark <robdclark@chromium.org>
Wed, 4 Sep 2019 18:28:26 +0000 (11:28 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 6 Sep 2019 00:13:44 +0000 (00:13 +0000)
Need to use ir3_instr_set_address(), otherwise the instruction might not
get added to the indirects table.  This becomes a problem when we turn
on copy propagation for relative accesses, as check_instr() in the sched
pass won't realize there is an indirect consumer of address register
load that is ready to be scheduled.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/ir3/ir3_cp.c

index 3039e50..f0fe836 100644 (file)
@@ -643,7 +643,7 @@ instr_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr)
                        instr->opc   = cond->opc;
                        instr->flags = cond->flags;
                        instr->cat2  = cond->cat2;
-                       instr->address = cond->address;
+                       ir3_instr_set_address(instr, cond->address);
                        instr->regs[1] = cond->regs[1];
                        instr->regs[2] = cond->regs[2];
                        instr->barrier_class |= cond->barrier_class;