md.texi: Document vec_shl_<mode> pattern.
authorJakub Jelinek <jakub@redhat.com>
Wed, 19 Jun 2019 10:00:04 +0000 (12:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 19 Jun 2019 10:00:04 +0000 (12:00 +0200)
commit2e83f583c27ef7a9d3b0fb0b5ed372439d6222a8
tree34682e23ea4f37c5d4665d95460d04025ea317b3
parent6a2892a6d3aef8a1ce26386d626f26e6100099f6
md.texi: Document vec_shl_<mode> pattern.

* doc/md.texi: Document vec_shl_<mode> pattern.
* optabs.def (vec_shl_optab): New optab.
* optabs.c (shift_amt_for_vec_perm_mask): Add shift_optab
argument, if == vec_shl_optab, check for left whole vector shift
pattern rather than right shift.
(expand_vec_perm_const): Add vec_shl_optab support.
* optabs-query.c (can_vec_perm_var_p): Mention also vec_shl optab
in the comment.
* tree-vect-generic.c (lower_vec_perm): Support permutations which
can be handled by vec_shl_optab.
* tree-vect-stmts.c (scan_store_can_perm_p): New function.
(check_scan_store): Use it.
(vectorizable_scan_store): If target can't do normal permutations,
try to use whole vector left shifts and if needed a VEC_COND_EXPR
after it.
* config/i386/sse.md (vec_shl_<mode>): New expander.

* gcc.dg/vect/vect-simd-8.c: If main is defined, don't include
tree-vect.h nor call check_vect.
* gcc.dg/vect/vect-simd-9.c: Likewise.
* gcc.dg/vect/vect-simd-10.c: New test.
* gcc.target/i386/sse2-vect-simd-8.c: New test.
* gcc.target/i386/sse2-vect-simd-9.c: New test.
* gcc.target/i386/sse2-vect-simd-10.c: New test.
* gcc.target/i386/avx2-vect-simd-8.c: New test.
* gcc.target/i386/avx2-vect-simd-9.c: New test.
* gcc.target/i386/avx2-vect-simd-10.c: New test.
* gcc.target/i386/avx512f-vect-simd-8.c: New test.
* gcc.target/i386/avx512f-vect-simd-9.c: New test.
* gcc.target/i386/avx512f-vect-simd-10.c: New test.

From-SVN: r272472
21 files changed:
gcc/ChangeLog
gcc/config/i386/sse.md
gcc/doc/md.texi
gcc/optabs-query.c
gcc/optabs.c
gcc/optabs.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-simd-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-simd-8.c
gcc/testsuite/gcc.dg/vect/vect-simd-9.c
gcc/testsuite/gcc.target/i386/avx2-vect-simd-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx2-vect-simd-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx2-vect-simd-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vect-simd-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vect-simd-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vect-simd-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse2-vect-simd-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse2-vect-simd-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse2-vect-simd-9.c [new file with mode: 0644]
gcc/tree-vect-generic.c
gcc/tree-vect-stmts.c