From c7da0354531098a6827b42b00689e92ef61053cd Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 19 Feb 2010 15:42:31 +0000 Subject: re PR tree-optimization/42916 ("-fcompare-debug failure" with "-O1 -funroll-loops -ftree-vectorize") 2010-02-19 Richard Guenther PR tree-optimization/42916 * tree-vect-slp.c (vect_slp_analyze_bb): Count only real instructions. * gcc.dg/pr42916.c: New testcase. From-SVN: r156898 --- gcc/tree-vect-slp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/tree-vect-slp.c') diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 5a11b84..ee4807a 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1273,7 +1273,13 @@ vect_slp_analyze_bb (basic_block bb) fprintf (vect_dump, "===vect_slp_analyze_bb===\n"); for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) - insns++; + { + gimple stmt = gsi_stmt (gsi); + if (!is_gimple_debug (stmt) + && !gimple_nop_p (stmt) + && !gimple_code (stmt) == GIMPLE_LABEL) + insns++; + } if (insns > PARAM_VALUE (PARAM_SLP_MAX_INSNS_IN_BB)) { -- cgit v1.1