From e004aa11b1d261b597aa3e062204af61762ba6a9 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 3 Jun 2015 13:10:13 +0000 Subject: tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_GAP for the first element. 2015-06-03 Richard Biener * tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_GAP for the first element. * tree-vect-slp.c (vect_build_slp_tree_1): Remove restriction on in-group gaps. * gcc.dg/vect/bb-slp-36.c: New testcase. From-SVN: r224077 --- gcc/tree-vect-slp.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'gcc/tree-vect-slp.c') diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 9e36d9c..5fd1635 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -777,17 +777,13 @@ vect_build_slp_tree_1 (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, (*max_nunits, group_size) / group_size; /* FORNOW: Check that there is no gap between the loads and no gap between the groups when we need to load - multiple groups at once. - ??? We should enhance this to only disallow gaps - inside vectors. */ - if ((unrolling_factor > 1 - && ((GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt - && GROUP_GAP (vinfo_for_stmt (stmt)) != 0) - /* If the group is split up then GROUP_GAP - isn't correct here, nor is GROUP_FIRST_ELEMENT. */ - || GROUP_SIZE (vinfo_for_stmt (stmt)) > group_size)) - || (GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) != stmt - && GROUP_GAP (vinfo_for_stmt (stmt)) != 1)) + multiple groups at once. */ + if (unrolling_factor > 1 + && ((GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt + && GROUP_GAP (vinfo_for_stmt (stmt)) != 0) + /* If the group is split up then GROUP_GAP + isn't correct here, nor is GROUP_FIRST_ELEMENT. */ + || GROUP_SIZE (vinfo_for_stmt (stmt)) > group_size)) { if (dump_enabled_p ()) { -- cgit v1.1