summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2021-06-18 12:48:06 +0200
committerMarge Bot <eric+marge@anholt.net>2021-06-23 17:20:29 +0000
commitef7bc4a2aa6b0a0063a478499f74a85cf3ef1dd1 (patch)
tree20b895a9f1d4e53edf700824ad7a2845cf3f80d9
parent0f329ba10ae64a6c58d7945d8b1b3f19959878e2 (diff)
ir3: Update ir3_register::instr when cloning instructions
We happened to not clone any SSA instructions, but we will once address instructions start counting as SSA. Fix this oversight. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11469>
-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;