]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/101668 - relax SLP of existing vectors
authorRichard Biener <rguenther@suse.de>
Tue, 31 May 2022 07:37:05 +0000 (09:37 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 2 Jun 2022 06:35:23 +0000 (08:35 +0200)
commit08afab6f8642f58f702010ec196dce3b00955627
treefecb020d184300f9a86b413a3b1ed959b3dcbcf3
parent4a6b8d9aad9f68eec223cc126d9effbf45e37271
tree-optimization/101668 - relax SLP of existing vectors

This relaxes the conditions on SLPing extracts from existing vectors
leveraging the relaxed VEC_PERM conditions on the input vs output
vector type compatibility.  It also handles lowpart extracts
and concats without VEC_PERMs now.

2022-05-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101668
* tree-vect-slp.cc (vect_build_slp_tree_1): Allow BIT_FIELD_REFs
for vector types with compatible lane types.
(vect_build_slp_tree_2): Deal with this.
(vect_add_slp_permutation): Adjust.  Emit lowpart/concat
special cases without VEC_PERM.
(vectorizable_slp_permutation): Select the operand vector
type and relax requirements.  Handle identity permutes
with mismatching operand types.
* optabs-query.cc (can_vec_perm_const_p): Only allow variable
permutes for op_mode == mode.

* gcc.target/i386/pr101668.c: New testcase.
* gcc.dg/vect/bb-slp-pr101668.c: Likewise.
gcc/optabs-query.cc
gcc/testsuite/gcc.dg/vect/bb-slp-pr101668.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr101668.c [new file with mode: 0644]
gcc/tree-vect-slp.cc