summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_vpm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_vpm.c b/src/gallium/drivers/vc4/vc4_opt_vpm.c
index 34ea3363511..83ba11b817f 100644
--- a/src/gallium/drivers/vc4/vc4_opt_vpm.c
+++ b/src/gallium/drivers/vc4/vc4_opt_vpm.c
@@ -115,11 +115,12 @@ qir_opt_vpm(struct vc4_compile *c)
* sources are independent of previous instructions
*/
if (temps == 1) {
- list_del(&inst->link);
inst->src[j] = mov->src[0];
- list_replace(&mov->link, &inst->link);
- c->defs[temp] = NULL;
- free(mov);
+
+ list_del(&inst->link);
+ list_addtail(&inst->link, &mov->link);
+ qir_remove_instruction(c, mov);
+
progress = true;
break;
}