]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/114375 - disallow SLP discovery of permuted mask loads
authorRichard Biener <rguenther@suse.de>
Mon, 18 Mar 2024 11:39:03 +0000 (12:39 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 8 May 2024 12:53:19 +0000 (14:53 +0200)
commit4f2a35a76cca503749c696e7772d2e8eadc77ba5
tree319bee0590ce78fb323ec191e624697d2d902893
parentc63704a2d840436797f54e175a2af0cb029889d2
tree-optimization/114375 - disallow SLP discovery of permuted mask loads

We cannot currently handle permutations of mask loads in code generation
or permute optimization.  But we simply drop any permutation on the
floor, so the following instead rejects the SLP build rather than
producing wrong-code.  I've also made sure to reject them in
vectorizable_load for completeness.

PR tree-optimization/114375
* tree-vect-slp.cc (vect_build_slp_tree_2): Compute the
load permutation for masked loads but reject it when any
such is necessary.
* tree-vect-stmts.cc (vectorizable_load): Reject masked
VMAT_ELEMENTWISE and VMAT_STRIDED_SLP as those are not
supported.

* gcc.dg/vect/vect-pr114375.c: New testcase.

(cherry picked from commit 94c3508c5a14d1948fe3bffa9e16c6f3d9c2836a)
gcc/testsuite/gcc.dg/vect/vect-pr114375.c [new file with mode: 0644]
gcc/tree-vect-slp.cc
gcc/tree-vect-stmts.cc
This page took 0.06467 seconds and 5 git commands to generate.