The following uses the SLP node vectype rather than the vectype stored in the DR group.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-09-17 Richard Biener <rguent...@suse.de> * tree-vect-stmts.c (vectorizable_load): Use the vectype from the SLP node. --- gcc/tree-vect-stmts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index ce79d883dbf..17849b575b7 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -8650,7 +8650,7 @@ vectorizable_load (vec_info *vinfo, FOR_EACH_VEC_ELT (SLP_TREE_LOAD_PERMUTATION (slp_node), j, k) if (k > maxk) maxk = k; - tree vectype = STMT_VINFO_VECTYPE (group_info); + tree vectype = SLP_TREE_VECTYPE (slp_node); if (!TYPE_VECTOR_SUBPARTS (vectype).is_constant (&nunits) || maxk >= (DR_GROUP_SIZE (group_info) & ~(nunits - 1))) { -- 2.31.1