diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c new file mode 100644 index 000000000000..672807f167c3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ + +int a; +struct b { + int c; + int d; +}; +void k (struct b); +struct b +e() +{ + void *f[] = {&&g, &&h, &&i, &&j}; + int d, c; +j: + goto *a; +g: + d = 0; +h: + c = 1; + goto *a; +i: + { + struct b b = {c, d}; + k(b); + } +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index c09aa3924194..6cb2286d5c87 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8568,6 +8568,9 @@ vectorizable_live_operation (vec_info *vinfo, gimple_seq stmts = NULL; new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree), &stmts, true, NULL_TREE); + if (TREE_CODE (new_tree) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_tree) = 1; if (is_a (vec_stmt)) { gimple_stmt_iterator si = gsi_after_labels (gimple_bb (vec_stmt));