diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-06-19 12:00:04 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-06-19 12:00:04 +0200 |
commit | 2e83f583c27ef7a9d3b0fb0b5ed372439d6222a8 (patch) | |
tree | 34682e23ea4f37c5d4665d95460d04025ea317b3 /gcc/config | |
parent | 6a2892a6d3aef8a1ce26386d626f26e6100099f6 (diff) | |
download | gcc-2e83f583c27ef7a9d3b0fb0b5ed372439d6222a8.zip gcc-2e83f583c27ef7a9d3b0fb0b5ed372439d6222a8.tar.gz gcc-2e83f583c27ef7a9d3b0fb0b5ed372439d6222a8.tar.bz2 |
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
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/sse.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 5d8ada4..26309ae 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -11758,6 +11758,19 @@ (set_attr "mode" "<sseinsnmode>")]) +(define_expand "vec_shl_<mode>" + [(set (match_dup 3) + (ashift:V1TI + (match_operand:VI_128 1 "register_operand") + (match_operand:SI 2 "const_0_to_255_mul_8_operand"))) + (set (match_operand:VI_128 0 "register_operand") (match_dup 4))] + "TARGET_SSE2" +{ + operands[1] = gen_lowpart (V1TImode, operands[1]); + operands[3] = gen_reg_rtx (V1TImode); + operands[4] = gen_lowpart (<MODE>mode, operands[3]); +}) + (define_expand "vec_shr_<mode>" [(set (match_dup 3) (lshiftrt:V1TI |