]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/115741 - ICE with VMAT_CONTIGUOUS_REVERSE and gap
authorRichard Biener <rguenther@suse.de>
Tue, 2 Jul 2024 07:33:29 +0000 (09:33 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 2 Jul 2024 13:35:50 +0000 (15:35 +0200)
When we determine overrun we have to consider VMAT_CONTIGUOUS_REVERSE
the same as VMAT_CONTIGUOUS.

PR tree-optimization/115741
* tree-vect-stmts.cc (get_group_load_store_type): Also
handle VMAT_CONTIGUOUS_REVERSE when determining overrun.

gcc/tree-vect-stmts.cc

index aab3aa5996237fdf597cbd154c7463c5495800a8..20b845154463f5356070425a9a1c318f535987d6 100644 (file)
@@ -2099,7 +2099,8 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
             If there is a combination of the access not covering the full
             vector and a gap recorded then we may need to peel twice.  */
          if (loop_vinfo
-             && *memory_access_type == VMAT_CONTIGUOUS
+             && (*memory_access_type == VMAT_CONTIGUOUS
+                 || *memory_access_type == VMAT_CONTIGUOUS_REVERSE)
              && SLP_TREE_LOAD_PERMUTATION (slp_node).exists ()
              && !multiple_p (group_size * LOOP_VINFO_VECT_FACTOR (loop_vinfo),
                              nunits))