https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18940
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|SUSPENDED |NEW --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is mostly fixed on the trunk. What is left is: # RANGE [1, 1073741823] NONZERO 1073741823 D1360_10 = n_9(D) >> 1; ... # RANGE [4, 4294967292] NONZERO 4294967295 _18 = D1360_10 > 0 ? _19 : 4; Notice how we have the range for D1360_10 but then don't optimize the COND_EXPR ....