[Bug rtl-optimization/66552] Missed optimization when shift amount is result of signed modulus
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 11 07:34:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66552
--- Comment #12 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Sure, but what makes shift amount special here? This works just fine in
any other expression as well. That is, for unsigned n; for negative numbers
modulo works differently: it returns 0 or negative, so it is either UB, or
the masking works as expected. Is there not a better way to express that?
More information about the Gcc-bugs
mailing list