Commit 70f48ed4 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Reflow constant move loop

parent 59d2b93c
......@@ -642,17 +642,15 @@ eliminate_constant_mov(compiler_context *ctx)
bool used = false;
/* If the register has been overwritten, the search stops, so
* keep track of live status */
bool live = true;
for (midgard_instruction *candidate = (move + 1); IN_ARRAY(candidate, ctx->current_block) && live && !used; candidate += 1) {
for (midgard_instruction *candidate = (move + 1);
IN_ARRAY(candidate, ctx->current_block);
candidate += 1) {
/* Check this candidate for usage */
if (candidate->ssa_args.src0 == target_reg ||
candidate->ssa_args.src1 == target_reg) {
used = true;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment