diff options
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r-- | src/freedreno/ir3/ir3_cp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c index 052c8a539ac..b95827e97e9 100644 --- a/src/freedreno/ir3/ir3_cp.c +++ b/src/freedreno/ir3/ir3_cp.c @@ -143,9 +143,11 @@ static bool valid_flags(struct ir3_instruction *instr, unsigned n, * called on a src that has already had an indirect load folded * in, in which case ssa() returns NULL */ - struct ir3_instruction *src = ssa(instr->regs[n+1]); - if (src && src->address->block != instr->block) - return false; + if (instr->regs[n+1]->flags & IR3_REG_SSA) { + struct ir3_instruction *src = ssa(instr->regs[n+1]); + if (src->address->block != instr->block) + return false; + } } switch (opc_cat(instr->opc)) { |