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.


gcc/
        PR tree-optimization/68413
        * tree-vect-loop.c (vectorizable_reduction): Only check for
        integer cond reduction on analysis stage.




Thanks,
Alan.

Attachment: analysisonlycondcheck.patch
Description: Binary data

Reply via email to