Avoid is_constant calls in vectorizable_bswap
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 24 Aug 2018 13:06:09 +0000 (13:06 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 24 Aug 2018 13:06:09 +0000 (13:06 +0000)
commit8c2f568c9a8375927efede4bfc83d6553da7f9a2
tree1199c644ada18f8864e7a19909236e5647c67382
parentab7e60cec1a6f4185b0428f3a2b3e71df0bae533
Avoid is_constant calls in vectorizable_bswap

The "new" VEC_PERM_EXPR handling makes it easy to support bswap
for variable-length vectors.

2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
vectors.

gcc/testsuite/
* gcc.target/aarch64/sve/bswap_1.c: New test.
* gcc.target/aarch64/sve/bswap_2.c: Likewise.
* gcc.target/aarch64/sve/bswap_3.c: Likewise.

From-SVN: r263833
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/bswap_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/bswap_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/bswap_3.c [new file with mode: 0644]
gcc/tree-vect-stmts.c