re PR tree-optimization/91940 (__builtin_bswap16 loop optimization)
authorJakub Jelinek <jakub@redhat.com>
Wed, 2 Oct 2019 10:18:50 +0000 (12:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 2 Oct 2019 10:18:50 +0000 (12:18 +0200)
commit9ff9a0a5e6edd8729f559bf86ca06f781c4da246
tree674edce34be00804e4173059cfd92b57f8f34aff
parent291fa23ac04e317877c1e102937532f080180bb2
re PR tree-optimization/91940 (__builtin_bswap16 loop optimization)

PR tree-optimization/91940
* tree-vect-patterns.c: Include tree-vector-builder.h and
vec-perm-indices.h.
(vect_recog_rotate_pattern): Also handle __builtin_bswap16, either by
unpromoting the argument back to uint16_t, or by converting into a
rotate, or into shifts plus ior.

* gcc.dg/vect/vect-bswap16.c: Add -msse4 on x86, run on all targets,
expect vectorized 1 loops message on both vect_bswap and sse4_runtime
targets.
* gcc.dg/vect/vect-bswap16a.c: New test.

From-SVN: r276442
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-bswap16.c
gcc/testsuite/gcc.dg/vect/vect-bswap16a.c [new file with mode: 0644]
gcc/tree-vect-patterns.c