https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115143
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- here is the simplified gimple testcase so it does not depend on optimizations before hand: ``` unsigned __GIMPLE (ssa,startwith("phiopt")) foo (unsigned a, unsigned b) { unsigned j; unsigned _23; unsigned _12; __BB(2): if (a_6(D) != 0u) goto __BB3; else goto __BB4; __BB(3): j_10 = __PHI (__BB2: b_11(D)); _23 = __MIN (a_6(D), j_10); goto __BB4; __BB(4): _12 = __PHI (__BB3: _23, __BB2: 0u); return _12; } ``` Here is one which failed since GCC 10 (when __MIN support was added for gimple FE): ``` signed __GIMPLE (ssa,startwith("phiopt")) foo (signed a, unsigned b) { signed j; signed _23; signed _12; __BB(2): if (a_6(D) > 0) goto __BB3; else goto __BB4; __BB(3): j_10 = __PHI (__BB2: b_11(D)); _23 = __MIN (a_6(D), j_10); goto __BB4; __BB(4): _12 = __PHI (__BB3: _23, __BB2: 0); return _12; } ```