diff options
author | Richard Biener <rguenther@suse.de> | 2015-06-09 14:13:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-06-09 14:13:09 +0000 |
commit | fe2bef710763c2900de5dc087f3bcb49d00e8db2 (patch) | |
tree | bee6d75448cbff904b09003da6e80dcf500bb22f /gcc | |
parent | 12d03fc7ff0a79601e28cd76e7360a420da6e0bf (diff) | |
download | gcc-fe2bef710763c2900de5dc087f3bcb49d00e8db2.zip gcc-fe2bef710763c2900de5dc087f3bcb49d00e8db2.tar.gz gcc-fe2bef710763c2900de5dc087f3bcb49d00e8db2.tar.bz2 |
tree-vect-slp.c (vect_build_slp_tree_1): Remove bailout on gaps.
2015-06-09 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_build_slp_tree_1): Remove bailout on gaps.
(vect_analyze_slp_instance): Instead do not falsely drop
load permutations.
From-SVN: r224281
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 35 |
2 files changed, 13 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ad4d66..4eed107 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-06-09 Richard Biener <rguenther@suse.de> + * tree-vect-slp.c (vect_build_slp_tree_1): Remove bailout on gaps. + (vect_analyze_slp_instance): Instead do not falsely drop + load permutations. + +2015-06-09 Richard Biener <rguenther@suse.de> + PR middle-end/66423 * match.pd: Handle A % (unsigned)(1 << B). diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 660c8b2..20e4aba 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -762,33 +762,6 @@ vect_build_slp_tree_1 (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, else { /* Load. */ - unsigned unrolling_factor - = least_common_multiple - (*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. */ - 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 ()) - { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "Build SLP failed: grouped " - "loads have gaps "); - dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, - stmt, 0); - dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); - } - /* Fatal mismatch. */ - matches[0] = false; - return false; - } - /* Check that the size of interleaved loads group is not greater than the SLP group size. */ unsigned ncopies @@ -1846,7 +1819,13 @@ vect_analyze_slp_instance (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, this_load_permuted = true; load_permutation.safe_push (load_place); } - if (!this_load_permuted) + if (!this_load_permuted + /* The load requires permutation when unrolling exposes + a gap either because the group is larger than the SLP + group-size or because there is a gap between the groups. */ + && (unrolling_factor == 1 + || (group_size == GROUP_SIZE (vinfo_for_stmt (first_stmt)) + && GROUP_GAP (vinfo_for_stmt (first_stmt)) == 0))) { load_permutation.release (); continue; |