On Fri, 10 Jan 2020, Andre Vieira (lists) wrote:

> Hi,
> 
> This patch addresses the problem reported in PR92429.  When creating an
> epilogue for vectorization we have to replace the SSA_NAMEs in the
> PATTERN_DEF_SEQs and RELATED_STMTs of the epilogue's loop_vec_infos. When
> doing this we were using simplify_replace_tree which always folds the
> replacement.  This may lead to a different tree-node than the one which was
> analyzed in vect_loop_analyze.  In turn the new tree-node may require a
> different vectorization than the one we had prepared for which caused the ICE
> in question.
> 
> This patch adds a parameter to the simplify_replace_tree function such that we
> can optionally disable folding as this patch does in
> update_epilogue_loop_vinfo.
> 
> Bootstrapped and regression tested on x86_64.
> 
> Is this OK for trunk?

OK.

Thanks,
Richard.

> gcc/ChangeLog:
> 2020-01-10  Andre Vieira  <andre.simoesdiasvie...@arm.com>
> 
>         PR tree-optimization/92429
>         * tree-ssa-loop-niter.h (simplify_replace_tree): Add parameter.
>         * tree-ssa-loop-niter.c (simplify_replace_tree): Add parameter
>         to control folding.
>         * tree-vect-loop.c (update_epilogue_vinfo): Do not fold when
>         replacing tree.
> 
> gcc/testsuite/ChangeLog:
> 2020-01-10  Andre Vieira  <andre.simoesdiasvie...@arm.com>
> 
>         PR tree-optimization/92429
>         * gcc.dg/vect/pr92429.c
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Reply via email to