From: Alyssa Rosenzweig Date: Mon, 5 Aug 2019 17:53:41 +0000 (-0700) Subject: pan/midgard: Rewrite bidirectionally when eliminating moves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28697583557e37e3dec95aa043411594e3c25623;p=mesa.git pan/midgard: Rewrite bidirectionally when eliminating moves Symptom: the sky is black in SuperTuxKart (flashbacks to SMB/NES emulation intensify). Essentially, what happened is a fixed (special) move to r0 was eliminated but scheduling did not factor this in, so can_run_concurrent_ssa returned true even when there was a logical data dependency that needed to be resolved. Fixes: 20771ede1c0 ("pan/midgard: Add post-RA move elimination") Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_opt_dce.c b/src/panfrost/midgard/midgard_opt_dce.c index 28f0886fe31..9964675763c 100644 --- a/src/panfrost/midgard/midgard_opt_dce.c +++ b/src/panfrost/midgard/midgard_opt_dce.c @@ -123,9 +123,8 @@ midgard_opt_post_move_eliminate(compiler_context *ctx, midgard_block *block, str if (mir_nontrivial_outmod(ins)) continue; if (ins->mask != 0xF) continue; - /* We do want to rewrite to keep the graph sane for pipeline - * register creation (TODO: is this the best approach?) */ - mir_rewrite_index_dst(ctx, ins->ssa_args.src[1], ins->ssa_args.dest); + /* We do need to rewrite to facilitate pipelining/scheduling */ + mir_rewrite_index(ctx, ins->ssa_args.src[1], ins->ssa_args.dest); /* We're good to go */ mir_remove_instruction(ins);