[Bug tree-optimization/71563] [6/7 Regression] Regression in GCC-7.0.0's optimizer.

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 17 08:52:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71563

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> That said, about the zero/non-zero bits, it is
> even more complicated in this case, because e.g. 1 / -1 has all bits set,
> the thing is just that it is then undefined behavior for the shift.
> Wonder what optimization performed this at the RTL level and if it gets all
> the cases right.

(I didn't check)
A << B is the same as A << (B & 31). If B is C << 8, it isn't hard to determine
that (C << 8) & 31 is 0.


More information about the Gcc-bugs mailing list