diff options
author | Richard Biener <rguenther@suse.de> | 2024-09-24 13:47:04 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-09-24 15:04:31 +0200 |
commit | cef29936c6b6773bff1939f94fb629760725bd82 (patch) | |
tree | 02cf199bb30d7feacdaee910ffc86f6655cb6a90 | |
parent | 4bd3ccae58d40fad6bd99ed08ef4e1e4d70fefd0 (diff) | |
download | gcc-cef29936c6b6773bff1939f94fb629760725bd82.zip gcc-cef29936c6b6773bff1939f94fb629760725bd82.tar.gz gcc-cef29936c6b6773bff1939f94fb629760725bd82.tar.bz2 |
tree-optimization/116819 - SLP with !STMT_VINFO_RELEVANT representative
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.
-rw-r--r-- | gcc/tree-vect-stmts.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index c654e01..1b351c5 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -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 (); } } |