Vectorise conversions between differently-sized integer vectors
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 14 Nov 2019 15:31:25 +0000 (15:31 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 14 Nov 2019 15:31:25 +0000 (15:31 +0000)
commit9c437a108a14b9bdc44659c131b0da944e5ffeab
treee28c10ce8b60ec8052a44093e947d44c2db4e240
parent05101d1b575a57ca26e4275e971da85a0dd1d52a
Vectorise conversions between differently-sized integer vectors

This patch adds AArch64 patterns for converting between 64-bit and
128-bit integer vectors, and makes the vectoriser and expand pass
use them.

2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-cfg.c (verify_gimple_assign_unary): Handle conversions
between vector types.
* tree-vect-stmts.c (vectorizable_conversion): Extend the
non-widening and non-narrowing path to handle standard
conversion codes, if the target supports them.
* expr.c (convert_move): Try using the extend and truncate optabs
for vectors.
* optabs-tree.c (supportable_convert_operation): Likewise.
* config/aarch64/iterators.md (Vnarroqw): New iterator.
* config/aarch64/aarch64-simd.md (<optab><Vnarrowq><mode>2)
(trunc<mode><Vnarrowq>2): New patterns.

gcc/testsuite/
* gcc.dg/vect/bb-slp-pr69907.c: Do not expect BB vectorization
to fail for aarch64 targets.
* gcc.dg/vect/no-scevccp-outer-12.c: Expect the test to pass
on aarch64 targets.
* gcc.dg/vect/vect-double-reduc-5.c: Likewise.
* gcc.dg/vect/vect-outer-4e.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_5.c: New test.
* gcc.target/aarch64/vect_mixed_sizes_6.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_7.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_8.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_9.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_10.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_11.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_12.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_13.c: Likewise.

From-SVN: r278245
21 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md
gcc/expr.c
gcc/optabs-tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/bb-slp-pr69907.c
gcc/testsuite/gcc.dg/vect/no-scevccp-outer-12.c
gcc/testsuite/gcc.dg/vect/vect-double-reduc-5.c
gcc/testsuite/gcc.dg/vect/vect-outer-4e.c
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_11.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_12.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_9.c [new file with mode: 0644]
gcc/tree-cfg.c
gcc/tree-vect-stmts.c