[Bug middle-end/79665] gcc's signed (x*x)/200 is slower than clang's
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 21 22:06:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79665
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
What we can do IMHO is in expand_divmod, if we have division or modulo by
constant and the first operand is known to have 0 MSB (from get_range_info or
get_nonzero_bits), then we can expand it as both signed or unsigned
division/modulo, regardless what unsignedp is. Then we could compare costs of
both expansions and decide what is faster.
More information about the Gcc-bugs
mailing list