This adds a missing check.
2020-12-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/98191
* tree-vect-slp.c (vect_slp_check_for_constructors): Do not
follow a non-SSA def chain.
* gcc.dg/torture/pr98191.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+
+typedef double v2df __attribute__((vector_size(2*sizeof(double))));
+
+v2df foo (double *y)
+{
+ v2df x = (v2df){ 1.0, 2.0 };
+ x[0] = *y;
+ return x;
+}
def = gimple_assign_rhs1 (assign);
do
{
- if (!has_single_use (def))
+ if (TREE_CODE (def) != SSA_NAME
+ || !has_single_use (def))
break;
gimple *def_stmt = SSA_NAME_DEF_STMT (def);
unsigned this_lane;