re PR tree-optimization/46167 (ICE: SIGSEGV in flow_bb_inside_loop_p (cfgloop.c:776) with -O -ftree-vectorize)

PR tree-optimization/46167
	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check that there
	is basic block for the statement.

From-SVN: r165970
This commit is contained in:
Ira Rosen 2010-10-26 15:53:28 +00:00 committed by Ira Rosen
parent 883fff6cf7
commit 75264e61bd
5 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-10-26 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/46167
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check that there
is basic block for the statement.
2010-10-26 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Update to

View File

@ -1,3 +1,9 @@
2010-10-26 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/46167
* gcc.dg/vect/O-pr46167.c: New.
* gcc.dg/vect/vect.exp: Run tests with -O.
2010-10-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/44948

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
int foo (char c, int i)
{
int s = 0;
while (i--)
s += c;
return s;
}
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -126,6 +126,11 @@ set O1_VECTCFLAGS $DEFAULT_VECTCFLAGS
lappend O1_VECTCFLAGS "-O1"
lappend O1_VECTCFLAGS "-fdump-tree-vect-details"
global O_VECTCFLAGS
set O_VECTCFLAGS $DEFAULT_VECTCFLAGS
lappend O_VECTCFLAGS "-O"
lappend O_VECTCFLAGS "-fdump-tree-vect-details"
lappend DEFAULT_VECTCFLAGS "-O2"
# Tests that should be run without generating dump info
@ -287,6 +292,10 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[cS\]]] \
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O1-*.\[cS\]]] \
"" $O1_VECTCFLAGS
# With -O
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O-*.\[cS\]]] \
"" $O_VECTCFLAGS
# -fno-tree-reassoc
set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
lappend VECT_SLP_CFLAGS "-fno-tree-reassoc"

View File

@ -257,7 +257,7 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out)
stmt = SSA_NAME_DEF_STMT (oprnd0);
/* It could not be the dot_prod pattern if the stmt is outside the loop. */
if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
if (!gimple_bb (stmt) || !flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
return NULL;
/* FORNOW. Can continue analyzing the def-use chain when this stmt in a phi