This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR tree-optimization/68413 : Only check for integer cond reduction on analysis stage
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Alan Hayward <alan dot hayward at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 20 Nov 2015 12:00:36 +0100
- Subject: Re: [PATCH] PR tree-optimization/68413 : Only check for integer cond reduction on analysis stage
- Authentication-results: sourceware.org; auth=none
- References: <D274974C dot 9CDD%alan dot hayward at arm dot com>
On Fri, Nov 20, 2015 at 10:24 AM, Alan Hayward <alan.hayward@arm.com> wrote:
> When vectorising a integer induction condition reduction,
> is_nonwrapping_integer_induction ends up with different values for base
> during the analysis and build phases. In the first it is an INTEGER_CST,
> in the second the loop has been vectorised out and the base is now a
> variable.
>
> This results in the analysis and build stage detecting the
> STMT_VINFO_VEC_REDUCTION_TYPE as different types.
>
> The easiest way to fix this is to only check for integer induction
> conditions on the analysis stage.
I don't like this. For the evolution part we have added
STMT_VINFO_LOOP_PHI_EVOLUTION_PART. If you now need
the original initial value as well then just save it.
Or if you really want to go with the hack then please do not call
is_nonwrapping_integer_induction with vec_stmt != NULL but
initialize cond_expr_is_nonwrapping_integer_induction from
STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
The hack also lacks a comment.
Richard.
> gcc/
> PR tree-optimization/68413
> * tree-vect-loop.c (vectorizable_reduction): Only check for
> integer cond reduction on analysis stage.
>
>
>
>
> Thanks,
> Alan.
>