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.