diff options
-rw-r--r-- | src/panfrost/midgard/midgard_ra.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index a44d342c205..4754971acb2 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -497,16 +497,14 @@ mir_lower_special_reads(compiler_context *ctx) midgard_instruction *use = mir_next_op(pre_use); assert(use); mir_insert_instruction_before(use, m); + mir_rewrite_index_dst_tag(ctx, i, idx, classes[j]); } else { + idx = spill_idx++; + m = v_mov(i, blank_alu_src, idx); mir_insert_instruction_before(pre_use, m); + mir_rewrite_index_src_single(pre_use, i, idx); } } - - /* Rewrite to use */ - if (hazard_write) - mir_rewrite_index_dst_tag(ctx, i, idx, classes[j]); - else - mir_rewrite_index_src_tag(ctx, i, idx, classes[j]); } } |