Reorganize clean_up_phi() so that the tests in the loop are more sequential. It functionally identical but will help to detect other, less trivial, trivial phi-nodes. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- simplify.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/simplify.c b/simplify.c index e9995a546..f6471a4ef 100644 --- a/simplify.c +++ b/simplify.c @@ -187,12 +187,13 @@ static int clean_up_phi(struct instruction *insn) def = phi->def; if (def->phi_src == VOID || !def->bb) continue; - if (last) { - if (last->phi_src != def->phi_src) - same = 0; + if (!last) { + last = def; continue; } - last = def; + if (last->phi_src == def->phi_src) + continue; + same = 0; } END_FOR_EACH_PTR(phi); if (same) { -- 2.18.0