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 <alyssa.rosenzweig@collabora.com>
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);