]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/internal-fn.c
re PR target/83210 (__builtin_mul_overflow() generates suboptimal code when exactly...
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 30 Nov 2017 10:29:58 +0000 (11:29 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 30 Nov 2017 10:29:58 +0000 (11:29 +0100)
commit89b1427f8693699d64050cc4daf5626f6b96b96a
tree6eb12921ec5d8b6fd580bf01c82cbdc59ac2966c
parent7c080ade9d8198958a1a37854d5cc56f7b76b9f4
re PR target/83210 (__builtin_mul_overflow() generates suboptimal code when exactly one argument is the constant 2)

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.

From-SVN: r255269
gcc/ChangeLog
gcc/internal-fn.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr83210.c [new file with mode: 0644]