On Thu, Aug 11, 2016 at 11:38 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:56 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Aug 11, 2016 at 10:50 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> On Wed, Aug 10, 2016 at 5:58 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>>> Hi, >>>> Due to some reasons, tree-if-conv.c now factors floating point comparison >>>> out of cond_expr, >>>> resulting in mixed types in it. This does help CSE on common comparison >>>> operations. >>>> Only problem is that test gcc.dg/vect/pr56541.c now requires >>>> vect_cond_mixed to be >>>> vectorized. This patch changes the test in that way. >>>> Test result checked. Is it OK? >>> >>> Hmm, I think the fix is to fix if-conversion not doing that. Can you >>> track down why this happens? >> Hmm, but there are several common floating comparison operations in >> the case, by doing this, we could do CSE on GIMPLE, otherwise we >> depends on RTL optimizers. > > I see. > >> I thought we prefer GIMPLE level >> transforms? > > Yes, but the vectorizer is happier with the conditions present in the > COND_EXPR > and thus we concluded we always want to have them there. forwprop will > also aggressively put them back. Note that we cannot put back > tree_could_throw_p > conditions (FP compares with signalling nans for example) to properly model EH > (though for VEC_COND_EXPRs we don't really care here). Yes, also putting comparison together could enable possible target optimizations. I will check the if-conv behavior later.
Thanks, bin > > Note that nothing between if-conversion and vectorization will perform > the desired > CSE anyway. > > Richard. > > >> Thanks, >> bin >>> >>> Richard. >>> >>>> Thanks, >>>> bin >>>> >>>> gcc/testsuite/ChangeLog >>>> 2016-08-09 Bin Cheng <bin.ch...@arm.com> >>>> >>>> * gcc.dg/vect/pr56541.c: Require vect_cond_mixed.