[patch, vectorizer] Fix PR tree-optimization/36293
Richard Guenther
richard.guenther@gmail.com
Thu May 22 12:40:00 GMT 2008
On Thu, May 22, 2008 at 11:44 AM, Ira Rosen <IRAR@il.ibm.com> wrote:
>
> Hi,
>
> The fix of PR 36098
> (http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00802.html) revealed a
> problem in generation of strided loads with gaps. When there is a gap in a
> group of strided loads, we load all the elements (including the gaps) and
> then skip the loads that correspond to the gaps (the redundant loads are
> later removed by DCE). There is no need to check if the first load must be
> skipped, since it cannot be a gap (we start a group of strided access only
> with actual data-ref). However, the check was O.K. since the value of gap
> for a first load of the group was always 0. The fix of PR 36098 stored a
> value different from 0 in DR_GROUP_GAP of a first load causing ICE.
>
> Bootstrapped with vectorization enabled and tested on ppc-linux. O.K. for
> 4.3.1 and trunk?
This is ok.
Thanks,
Richard.
> Thanks,
> Ira
>
> ChangeLog:
>
> PR tree-optimization/36293
> * tree-vect-transform.c (vect_transform_strided_load): Don't check
> if the first load must be skipped because of a gap.
>
>
> Index: tree-vect-transform.c
> ===================================================================
> --- tree-vect-transform.c (revision 135751)
> +++ tree-vect-transform.c (working copy)
> @@ -5473,12 +5473,14 @@ vect_transform_strided_load (tree stmt,
> break;
>
> /* Skip the gaps. Loads created for the gaps will be removed by
> dead.
> - code elimination pass later.
> + code elimination pass later. No need to check for the first stmt
> in.
> + the group, since it always exists.
> DR_GROUP_GAP is the number of steps in elements from the previous
> access (if there is no gap DR_GROUP_GAP is 1). We skip loads that
> correspond to the gaps.
> */
> - if (gap_count < DR_GROUP_GAP (vinfo_for_stmt (next_stmt)))
> + if (next_stmt != first_stmt
> + && gap_count < DR_GROUP_GAP (vinfo_for_stmt (next_stmt)))
> {
> gap_count++;
> continue;
>
>
More information about the Gcc-patches
mailing list