Commit 6f01ad76 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/91063 (ICE in set_vinfo_for_stmt, at tree-vectorizer.c:676)

	PR tree-optimization/91063
	* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
	stmt from stmts sequence before calling vect_init_vector_1.
	Formatting fix.

	* gcc.dg/gomp/pr91063.c: New test.

From-SVN: r273041
parent 75da268e
2019-07-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.
2019-07-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2019-07-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/88833 PR target/88833
......
2019-07-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/91063
* gcc.dg/gomp/pr91063.c: New test.
2019-07-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2019-07-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/88833 PR target/88833
......
/* PR tree-optimization/91063 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp-simd" } */
/* { dg-additional-options "-mavx512f" { target { i?86-*-* x86_64-*-* } } } */
struct S { void *s; };
int
foo (struct S *x)
{
int r = 0;
int i;
#pragma omp simd reduction (+ : r)
for (i = 0; i < 64; ++i)
r += (int) (x->s != 0);
return r;
}
...@@ -1496,8 +1496,12 @@ vect_init_vector (stmt_vec_info stmt_info, tree val, tree type, ...@@ -1496,8 +1496,12 @@ vect_init_vector (stmt_vec_info stmt_info, tree val, tree type,
promotion of invariant/external defs. */ promotion of invariant/external defs. */
val = gimple_convert (&stmts, TREE_TYPE (type), val); val = gimple_convert (&stmts, TREE_TYPE (type), val);
for (gimple_stmt_iterator gsi2 = gsi_start (stmts); for (gimple_stmt_iterator gsi2 = gsi_start (stmts);
!gsi_end_p (gsi2); gsi_next (&gsi2)) !gsi_end_p (gsi2); )
vect_init_vector_1 (stmt_info, gsi_stmt (gsi2), gsi); {
init_stmt = gsi_stmt (gsi2);
gsi_remove (&gsi2, false);
vect_init_vector_1 (stmt_info, init_stmt, gsi);
}
} }
} }
val = build_vector_from_val (type, val); val = build_vector_from_val (type, val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment