]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/119166 - ICE with --param vect-force-slp=0
authorRichard Biener <rguenther@suse.de>
Tue, 11 Mar 2025 07:29:05 +0000 (08:29 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 11 Mar 2025 07:30:38 +0000 (08:30 +0100)
The following fixes a missing guard on slp_node in get_load_store_type.

PR tree-optimization/119166
* tree-vect-stmts.cc (get_load_store_type): Guard SLP tree
access.

gcc/tree-vect-stmts.cc

index 743631f944884a31505a95f7a188fd4e4ca3797d..f894787f7bfb707d7344fe13c5d81d8811213c9b 100644 (file)
@@ -2708,7 +2708,7 @@ get_load_store_type (vec_info  *vinfo, stmt_vec_info stmt_info,
         such only the first load in the group is aligned, the rest are not.
         Because of this the permutes may break the alignment requirements that
         have been set, and as such we should for now, reject them.  */
-      if (SLP_TREE_LOAD_PERMUTATION (slp_node).exists ())
+      if (slp_node && SLP_TREE_LOAD_PERMUTATION (slp_node).exists ())
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,