Fix yet another bug to do with IR register outputs.
authorDavid Given <dg@cowlark.com>
Sat, 15 Oct 2016 17:14:25 +0000 (19:14 +0200)
committerDavid Given <dg@cowlark.com>
Sat, 15 Oct 2016 17:14:25 +0000 (19:14 +0200)
mach/proto/mcg/pass_instructionselection.c

index 752648d..52adc7b 100644 (file)
@@ -205,7 +205,7 @@ static struct insn* walk_instructions(struct burm_node* node, int goal)
             hop_print('I', current_hop);
             array_append(&current_bb->hops, current_hop);
 
-            if (goal != burm_stmt_NT)
+            if ((goal != burm_stmt_NT) && !insn->ir->result)
                 insn->ir->result = insn->hop->output;
         }
     }