https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48580
--- Comment #25 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We have this now: if (tmp.3_3 > 0) goto <bb 3>; [59.00%] else goto <bb 4>; [41.00%] <bb 3> [local count: 633507679]: _10 = _12 == 0; <bb 4> [local count: 1073741824]: # iftmp.2_5 = PHI <_10(3), 0(2)> I suspect what we could do is in isel change that to: iftmp.2_5 = tmp.3_3 > 0 ? _12 == 0 : 0; (which itself gets optimized to: iftmp.2_5 = (tmp.3_3 > 0) & (_12 == 0) Which should produce better code at least.