https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114386
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note after my r13-7928-gcda1992a56779e5c60a70f251542a6f662fdfa60 patch we get from phiopt: ``` if (a.1_1 != 0) goto <bb 4>; [50.00%] else goto <bb 3>; [50.00%] <bb 3> [local count: 536870913]: _3 = MAX_EXPR <a.1_1, g_7>; <bb 4> [local count: 1073741824]: # _2 = PHI <_3(3), 0(2)> ``` Which is correct. And then later on we get: ``` if (a.1_1 != 0) goto <bb 3>; [50.00%] else goto <bb 4>; [50.00%] <bb 3> [local count: 536870912]: <bb 4> [local count: 1073741824]: # _2 = PHI <g_7(2), 0(3)> ```` Note the trunk we get finally: ``` _10 = ~a.1_1; _11 = g_6 & _10; ``` Which is the best (well really `a < g` but that is a different known issue).