https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784

--- Comment #26 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 11 Jun 2019, helijia at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
> 
> --- Comment #25 from Li Jia He <helijia at gcc dot gnu.org> ---
> Indeed, this patch cannot catch all variants that appear.
> 
> I found that the optimize_vec_cond_expr function in the tree-ssa-reassoc.c 
> file
> will
> call maybe_fold_and_comparisons and maybe_fold_or_comparisons, so just this
> patch
> can also handle the non-branchy cases without adding those pattern to 
> match.pd.
> 
> Indeed if we add the corresponding pattern to match.pd file and it would be
> better to let ifcombine identify these patterns.  I will try to re-writing
> ifcombine to identify these patterns.

Note this is a complex task without either building the
non-brancy version in GENERIC or GIMPLE which is what the
code wanted to avoid in the first place.  I think improving
both match.pd and maybe_fold_and_comparisons is OK at this point.

Reply via email to