[3/3] [AArch64][vect] vec_widen_lshift pattern
authorJoel Hutton <joel.hutton@arm.com>
Thu, 19 Nov 2020 10:43:53 +0000 (10:43 +0000)
committerJoel Hutton <joel.hutton@arm.com>
Thu, 19 Nov 2020 11:49:59 +0000 (11:49 +0000)
commit27842e2a1eb26a7eae80b8efd98fb8c8bd74a68e
treef1201421b53cb3c438e52f1dc132d35b0666b1ef
parent9fc9573f9a5e9432e53c7de93985cfbd267f0309
[3/3] [AArch64][vect] vec_widen_lshift pattern

Add aarch64 vec_widen_lshift_lo/hi patterns and fix bug it triggers in
mid-end. This pattern takes one vector with N elements of size S, shifts
each element left by the element width and stores the results as N
elements of size 2*s (in 2 result vectors). The aarch64 backend
implements this with the shll,shll2 instruction pair.

gcc/ChangeLog:

* config/aarch64/aarch64-simd.md: Add vec_widen_lshift_hi/lo<mode>
patterns.
* tree-vect-stmts.c (vectorizable_conversion): Fix for widen_lshift
case.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/vect-widen-lshift.c: New test.
gcc/config/aarch64/aarch64-simd.md
gcc/testsuite/gcc.target/aarch64/vect-widen-lshift.c [new file with mode: 0644]
gcc/tree-vect-stmts.c