Dead phi-nodes should be eliminated early or, even better, never emitted. For the moment, ignore them during IR validation since they make the tests fail despite being no-ops. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- ir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ir.c b/ir.c index 533e8e238..836d4eb24 100644 --- a/ir.c +++ b/ir.c @@ -29,6 +29,9 @@ static int check_phi_node(struct instruction *insn) pseudo_t phi; int err = 0; + if (!has_users(insn->target)) + return err; + if (bb_list_size(insn->bb->parents) != nbr_phi_operands(insn)) { sparse_error(insn->pos, "bad number of phi operands in:\n\t%s", show_instruction(insn)); -- 2.18.0