re PR target/85323 (SSE/AVX/AVX512 shift by 0 not optimized away)
authorJakub Jelinek <jakub@redhat.com>
Thu, 17 May 2018 09:54:36 +0000 (11:54 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 17 May 2018 09:54:36 +0000 (11:54 +0200)
commit28a8a768ebef5e31f950013f1b48b14c008b4b3b
treeb55a59fb3a2c1d50c6700d7191faf3008347f9ad
parent4e6a811fad69dde184dd2900d4809a6cd7b42cf9
re PR target/85323 (SSE/AVX/AVX512 shift by 0 not optimized away)

PR target/85323
* config/i386/i386.c: Include tree-vector-builder.h.
(ix86_vector_shift_count): New function.
(ix86_fold_builtin): Fold shift builtins by scalar count.
(ix86_gimple_fold_builtin): Likewise.

* gcc.target/i386/pr85323-1.c: New test.
* gcc.target/i386/pr85323-2.c: New test.
* gcc.target/i386/pr85323-3.c: New test.

From-SVN: r260311
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr85323-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr85323-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr85323-3.c [new file with mode: 0644]