]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/116819 - SLP with !STMT_VINFO_RELEVANT representative
authorRichard Biener <rguenther@suse.de>
Tue, 24 Sep 2024 11:47:04 +0000 (13:47 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 Sep 2024 13:04:31 +0000 (15:04 +0200)
Under some circumstances we can end up picking a not relevant stmt
as representative of a SLP node.  Instead of skipping stmt analysis
and declaring success we have to either ignore relevancy throughout
the code base or fail SLP operation verification.  The following
does the latter.

PR tree-optimization/116819
* tree-vect-stmts.cc (vect_analyze_stmt): When the SLP
representative isn't relevant signal failure instead of
success.

gcc/tree-vect-stmts.cc

index c654e01a540f2fcf0b275a28d1c383de560be590..1b351c5c66ec371562758b68cd7b4b307d6190b7 100644 (file)
@@ -13295,6 +13295,12 @@ vect_analyze_stmt (vec_info *vinfo,
           if (dump_enabled_p ())
             dump_printf_loc (MSG_NOTE, vect_location, "irrelevant.\n");
 
+         if (node)
+           return opt_result::failure_at (stmt_info->stmt,
+                                          "not vectorized:"
+                                          " irrelevant stmt as SLP node %p "
+                                          "representative.\n",
+                                          (void *)node);
           return opt_result::success ();
         }
     }