]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Support masked gather loads with SLP
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 30 Nov 2021 09:52:30 +0000 (09:52 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 30 Nov 2021 09:52:30 +0000 (09:52 +0000)
commit8af3f53d325fe4a6b1f3da64dc02d10978b9a116
tree216e2715a85af701255c8a76cda849bb6a351d2e
parent32ede1083fad4b68873bec3e5a775e2092d6566e
vect: Support masked gather loads with SLP

This patch extends the previous SLP gather load support so
that it can handle masked loads too.

gcc/
* tree-vect-slp.c (arg1_arg4_map): New variable.
(vect_get_operand_map): Handle IFN_MASK_GATHER_LOAD.
(vect_build_slp_tree_1): Likewise.
(vect_build_slp_tree_2): Likewise.
* tree-vect-stmts.c (vectorizable_load): Expect the mask to be
the last SLP child node rather than the first.

gcc/testsuite/
* gcc.dg/vect/vect-gather-3.c: New test.
* gcc.dg/vect/vect-gather-4.c: Likewise.
* gcc.target/aarch64/sve/mask_gather_load_8.c: Likewise.
gcc/testsuite/gcc.dg/vect/vect-gather-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-gather-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/mask_gather_load_8.c [new file with mode: 0644]
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c