https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109154
--- Comment #49 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Plus for 4+ args_len, if we don't find some smart sorting, we should still consider at least some reassociation between the COND_EXPRs, instead of emitting for 4 args_len 3 COND_EXPRs where second depends on the first and third depends on the second we could emit two independent COND_EXPRs and third that depends on those two. Of course, it might be harmful for register allocation if we do that aggressively for very large number of PHI args.