[Bug target/83210] __builtin_mul_overflow() generates suboptimal code when exactly one argument is the constant 2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 30 10:30:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83210
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Nov 30 10:29:58 2017
New Revision: 255269
URL: https://gcc.gnu.org/viewcvs?rev=255269&root=gcc&view=rev
Log:
PR target/83210
* internal-fn.c (expand_mul_overflow): Optimize unsigned
multiplication by power of 2 constant into two shifts + comparison.
* gcc.target/i386/pr83210.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr83210.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/internal-fn.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list