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.
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 ();
}
}