On Tue, Apr 30, 2024 at 3:38 PM Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Tue, Apr 30, 2024 at 09:30:00AM +0200, Richard Biener wrote:
> > On Mon, Apr 29, 2024 at 5:30 PM H.J. Lu <hjl.to...@gmail.com> wrote:
> > >
> > > On Mon, Apr 29, 2024 at 6:47 AM liuhongt <hongtao....@intel.com> wrote:
> > > >
> > > > The Fortran standard does not specify what the result of the MAX
> > > > and MIN intrinsics are if one of the arguments is a NaN. So it
> > > > should be ok to tranform reduction for IFN_COND_MIN with vectorized
> > > > COND_MIN and REDUC_MIN.
> > >
> > > The commit subject isn't very clear.   This patch isn't about "Don't 
> > > assert
> > > for IFN_COND_{MIN,MAX}".  It allows IFN_COND_{MIN,MAX} in
> > > vect_transform_reduction.
> >
> > Well, we allow it elsewhere, we just fail to enumerate all COND_* we allow
> > here correctly.
> >
> > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
> > > > Ok for trunk and backport to GCC14?
> >
> > OK for trunk and branch.
>
> Oops, I've just sent the same patch, just with a different testcase
> (reduced and which tests both the min and max).
> I think the reduced testcase is better.
Yes, please commit your patch :)
>
> > > > gcc/ChangeLog:
> > > >
> > > >         PR 114883
>
> Missing tree-optimization/
>
> > > >         * tree-vect-loop.cc (vect_transform_reduction): Don't assert
> > > >         for IFN_COND_{MIN, MAX}.
> > > >
> > > > gcc/testsuite/ChangeLog:
> > > >
> > > >         * gfortran.dg/pr114883.f90: New test.
>
>         Jakub
>


-- 
BR,
Hongtao

Reply via email to