Check mask argument's type when vectorising conditional functions
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 6 Jan 2020 17:58:57 +0000 (17:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 6 Jan 2020 17:58:57 +0000 (17:58 +0000)
commit8a0ae3c130cd1e6beb0087a6967d33d8203f0dce
treeaf87d5ce5e1b70a6840cf92abbb0423c748f5c51
parentd54fc770768add469f646c20c0cab4e42510d895
Check mask argument's type when vectorising conditional functions

We can't yet vectorise conditional internal functions whose boolean
condition is fed by a data access (or more generally, by a tree of logic
ops in which all the leaves are data accesses).  Although we should add
that eventually, we'd need further work to generate good-quality code.

Unlike vectorizable_load and vectorizalbe_store, vectorizable_call
wasn't checking whether the mask had a suitable type, leading to an
ICE on the testcases.

2020-01-06  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-stmts.c (vect_check_load_store_mask): Rename to...
(vect_check_scalar_mask): ...this.
(vectorizable_store, vectorizable_load): Update call accordingly.
(vectorizable_call): Use vect_check_scalar_mask to check the mask
argument in calls to conditional internal functions.

gcc/testsuite/
* gcc.dg/vect/vect-cond-arith-8.c: New test.
* gcc.target/aarch64/sve/cond_fmul_5.c: Likewise.

From-SVN: r279907
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-cond-arith-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_5.c [new file with mode: 0644]
gcc/tree-vect-stmts.c