summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 15:42:31 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 15:42:31 +0000
commitdd69389106ecfae21506ce0eddc27d8dbfec2da6 (patch)
tree4b89e58bc0e9daefe49eba7bec41de25c0c6e3ec /gcc/tree-vect-slp.c
parenta6b57da2a12d91d6b44f8523816ea4aa191cb619 (diff)
downloadgcc-dd69389106ecfae21506ce0eddc27d8dbfec2da6.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c8
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))
{