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.

Reply via email to