https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105835
Roger Sayle <roger at nextmovesoftware dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-06-03 Ever confirmed|0 |1 --- Comment #1 from Roger Sayle <roger at nextmovesoftware dot com> --- Hmm. There might be something missing in CCP (with -O1)... # RANGE [0, 1] NONZERO 1 _3 = (intD.6) _2; # RANGE [0, 65535] NONZERO 65535 _10 = _3 * 65535; d_11 = (short unsigned intD.18) _10; if (d_11 != 1) goto <bb 3>; [67.00%] else goto <bb 4>; [33.00%] So it knows _10 is either 0 or 65535, so if it knew d_11 had the range {0 or -1}, i.e. [-1,0] it would know d_11 != 1, and hence goto <bb 3>.