This adds a missing check.
2020-11-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/97733
* tree-vect-slp.c (vect_analyze_slp_instance): If less
than two reductions were relevant or live do nothing.
if (STMT_VINFO_RELEVANT_P (next_info)
|| STMT_VINFO_LIVE_P (next_info))
scalar_stmts.quick_push (next_info);
+ /* If less than two were relevant/live there's nothing to SLP. */
+ if (scalar_stmts.length () < 2)
+ return false;
}
/* Build the tree for the SLP instance. */