diff --git a/.pick_status.json b/.pick_status.json index f4b6a8144b0..34547cbb59b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -472,7 +472,7 @@ "description": "broadcom/compiler: fix postponed TMU spills with multiple writes", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c index 0fd52a988d3..09107523fb1 100644 --- a/src/broadcom/compiler/vir_register_allocate.c +++ b/src/broadcom/compiler/vir_register_allocate.c @@ -676,12 +676,19 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp) * with a new temp though. */ if (start_of_tmu_sequence) { + if (postponed_spill) { + postponed_spill->dst = + postponed_spill_temp; + } + if (!postponed_spill || + vir_get_cond(inst) == V3D_QPU_COND_NONE) { + postponed_spill_temp = + vir_get_temp(c); + add_node(c, + postponed_spill_temp.index, + c->nodes.info[spill_node].class_bits); + } postponed_spill = inst; - postponed_spill_temp = - vir_get_temp(c); - add_node(c, - postponed_spill_temp.index, - c->nodes.info[spill_node].class_bits); } else { v3d_emit_tmu_spill(c, inst, postponed_spill_temp,