From 23d79f9e1feff2bc44fd056abe721b2841bda79c Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Mon, 17 Jun 2024 11:34:25 +0200 Subject: [PATCH] ir3: index instructions before fixing up merge sets after spilling ir3_force_merge (through merge_merge_sets) expects instructions to be indexed. However, the instructions created during spilling would not be automatically indexed at this point. Fixes: 613eaac7b53 ("ir3: Initial support for spilling non-shared registers") Signed-off-by: Job Noorman Part-of: (cherry picked from commit 7a5b198a44a5838741209bb5457b59b2f352dc64) --- .pick_status.json | 2 +- src/freedreno/ir3/ir3_spill.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 87f333e5623..1ed43752ae6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -164,7 +164,7 @@ "description": "ir3: index instructions before fixing up merge sets after spilling", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "613eaac7b53bfbfcd6ef536412be6c9c63cdea4f", "notes": null diff --git a/src/freedreno/ir3/ir3_spill.c b/src/freedreno/ir3/ir3_spill.c index 9f425849885..c5777632bb5 100644 --- a/src/freedreno/ir3/ir3_spill.c +++ b/src/freedreno/ir3/ir3_spill.c @@ -2085,6 +2085,8 @@ fixup_merge_sets(struct ir3_liveness *live, struct ir3 *ir) } } + ir3_index_instrs_for_merge_sets(ir); + foreach_block (block, &ir->block_list) { foreach_instr (instr, &block->instr_list) { if (instr->opc != OPC_META_SPLIT && @@ -2103,7 +2105,6 @@ fixup_merge_sets(struct ir3_liveness *live, struct ir3 *ir) } } - ir3_index_instrs_for_merge_sets(ir); ir3_merge_regs(live, ir); }