From: David Given Date: Sat, 15 Oct 2016 17:14:25 +0000 (+0200) Subject: Fix yet another bug to do with IR register outputs. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0eb32e7553b0e2e161a4f9802e3a1d98681bf235;p=ack.git Fix yet another bug to do with IR register outputs. --- diff --git a/mach/proto/mcg/pass_instructionselection.c b/mach/proto/mcg/pass_instructionselection.c index 752648de5..52adc7b34 100644 --- a/mach/proto/mcg/pass_instructionselection.c +++ b/mach/proto/mcg/pass_instructionselection.c @@ -205,7 +205,7 @@ static struct insn* walk_instructions(struct burm_node* node, int goal) hop_print('I', current_hop); array_append(¤t_bb->hops, current_hop); - if (goal != burm_stmt_NT) + if ((goal != burm_stmt_NT) && !insn->ir->result) insn->ir->result = insn->hop->output; } }