https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95448
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization Last reconfirmed| |2020-06-02 CC| |jakub at gcc dot gnu.org Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The pass with the strongest bit tracking (CCP) does not handle the special assume-like CFGs at all and EVRP which would does not handle the indirect assumption of bit test vs. constant: _1 = v.v; _2 = _1 & 7; if (_2 != 1) goto <bb 3>; [INV] else goto <bb 4>; [INV] <bb 3> : __builtin_unreachable (); <bb 4> : _12 = _1 & 18446744073709551608; so while we see that _2 = [1, 1] at the start of bb 4 the value-range for _1 is determined from Adding assert for _1 from _1 + 18446744073709551615 <= 18446744073709551608 Adding assert for _1 from _1 != 0 to pushing new range for _1: long unsigned int [1, 18446744073709551609] EQUIVALENCES: { _1 } (1 elements) sth is amiss there. It looks like is_masked_range_test is the closest candidate but there if ((inv_mask & (inv_mask + 1)) != 0 || (val & mask) != val) return false; trips. Guess we're looking for a different kind of logic here.