freedreno/ir3: add helpers to move instructions
[mesa.git] / src / freedreno / ir3 / ir3_group.c
index 182afde222adf50e761cbeef0f5bff32519d65e6..61ecd5320b315f3f494fcae501ffd5c575ea1c29 100644 (file)
@@ -44,8 +44,7 @@ insert_mov(struct ir3_instruction *collect, int idx)
         * it should be safe to leave at the end of the block it is in:
         */
        if (src->block == collect->block) {
-               list_delinit(&mov->node);
-               list_addtail(&mov->node, &collect->node);
+               ir3_instr_move_before(mov, collect);
        }
 }