]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use the proper vectype
authorRichard Biener <rguenther@suse.de>
Fri, 17 Sep 2021 10:35:36 +0000 (12:35 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 20 Sep 2021 10:30:49 +0000 (12:30 +0200)
The following uses the SLP node vectype rather than the vectype
stored in the DR group.

2021-09-17  Richard Biener  <rguenther@suse.de>

* tree-vect-stmts.c (vectorizable_load): Use the vectype
from the SLP node.

gcc/tree-vect-stmts.c

index ce79d883dbf837e943a7893300f3ce78e33ff9c3..17849b575b7701aebecda91ce12690eb4efe681c 100644 (file)
@@ -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)))
                {