summaryrefslogtreecommitdiff
path: root/src/freedreno/ir3/ir3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/freedreno/ir3/ir3.c')
-rw-r--r--src/freedreno/ir3/ir3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c
index fdc6184728f..72e58e8a727 100644
--- a/src/freedreno/ir3/ir3.c
+++ b/src/freedreno/ir3/ir3.c
@@ -438,6 +438,8 @@ struct ir3_instruction * ir3_instr_clone(struct ir3_instruction *instr)
struct ir3_register *new_reg =
ir3_reg_create(new_instr, reg->num, reg->flags);
*new_reg = *reg;
+ if ((new_reg->flags & IR3_REG_DEST) && new_reg->instr)
+ new_reg->instr = new_instr;
}
return new_instr;