]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116575 - handle SLP of permuted masked loads
authorRichard Biener <rguenther@suse.de>
Tue, 8 Oct 2024 12:28:16 +0000 (14:28 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 9 Oct 2024 07:54:42 +0000 (09:54 +0200)
commitdc90578f0b3b766303eef6f1acce45d603dee2c6
tree9f664f0970de261528af2f0bdc3e268d73d109e9
parent5977b746db3925aaba37722f5312419d5f2968a5
tree-optimization/116575 - handle SLP of permuted masked loads

The following handles SLP discovery of permuted masked loads which
was prohibited (because wrongly handled) for PR114375.  In particular
with single-lane SLP at the moment all masked group loads appear
permuted and we fail to use masked load lanes as well.  The following
addresses parts of the issues, starting with doing correct basic
discovery - namely discover an unpermuted mask load followed by
a permute node.  In particular groups with gaps do not support masking
yet (and didn't before w/o SLP IIRC).  There's still issues with
how we represent masked load/store-lanes I think, but I first have to
get my hands on a good testcase.

PR tree-optimization/116575
PR tree-optimization/114375
* tree-vect-slp.cc (vect_build_slp_tree_2): Do not reject
permuted mask loads without gaps but instead discover a
node for the full unpermuted load and permute that with
a VEC_PERM node.

* gcc.dg/vect/vect-pr114375.c: Expect vectorization now with avx2.
gcc/testsuite/gcc.dg/vect/vect-pr114375.c
gcc/tree-vect-slp.cc