re PR target/80846 (auto-vectorized AVX2 horizontal sum should narrow to 128b right...
authorJakub Jelinek <jakub@redhat.com>
Thu, 20 Jul 2017 16:36:18 +0000 (18:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 20 Jul 2017 16:36:18 +0000 (18:36 +0200)
commit2953b72fdd6c7d812028a636dfadf1c0e89ca314
tree9740f0c35cbe98159b4b9080aece0a6577c130a6
parentf0a404561c4abc2fcb6015cc96ca779b8eecc411
re PR target/80846 (auto-vectorized AVX2 horizontal sum should narrow to 128b right away, to be more efficient for Ryzen and Intel)

PR target/80846
* config/i386/i386.c (ix86_expand_vector_init_general): Handle
V2TImode and V4TImode.
(ix86_expand_vector_extract): Likewise.
* config/i386/sse.md (VMOVE): Enable V4TImode even for just
TARGET_AVX512F, instead of only for TARGET_AVX512BW.
(ssescalarmode): Handle V4TImode and V2TImode.
(VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
(*vec_extractv2ti, *vec_extractv4ti): New insns.
(VEXTRACTI128_MODE): New mode iterator.
(splitter for *vec_extractv?ti first element): New.
(VEC_INIT_MODE): New mode iterator.
(vec_init<mode>): Consolidate 3 expanders into one using
VEC_INIT_MODE mode iterator.

* gcc.target/i386/avx-pr80846.c: New test.
* gcc.target/i386/avx2-pr80846.c: New test.
* gcc.target/i386/avx512f-pr80846.c: New test.

From-SVN: r250397
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-pr80846.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx2-pr80846.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-pr80846.c [new file with mode: 0644]