diff options
author | Richard Guenther <rguenther@suse.de> | 2010-02-19 15:42:31 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-02-19 15:42:31 +0000 |
commit | c7da0354531098a6827b42b00689e92ef61053cd (patch) | |
tree | 4b89e58bc0e9daefe49eba7bec41de25c0c6e3ec /gcc/tree-vect-slp.c | |
parent | e5dfb95fd7d79615a7d6a9573ea6d4aaa6c8d1bc (diff) | |
download | gcc-c7da0354531098a6827b42b00689e92ef61053cd.tar.gz |
re PR tree-optimization/42916 ("-fcompare-debug failure" with "-O1 -funroll-loops -ftree-vectorize")
2010-02-19 Richard Guenther <rguenther@suse.de>
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
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 5a11b84a953..ee4807a8034 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)) { |