This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [i386] Question about Constraint Modifier character in smaxdf3 pattern.
> -----Original Message-----
> From: Richard Guenther [mailto:richard.guenther@gmail.com]
> Sent: Monday, February 20, 2012 4:58 PM
> To: gcc@gcc.gnu.org
> Cc: Kumar, Venkataramanan
> Subject: Re: [i386] Question about Constraint Modifier character in smaxdf3
> pattern.
>
> On Sun, Feb 19, 2012 at 4:43 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> > On Sun, 19 Feb 2012, Kumar, Venkataramanan wrote:
> >
> >> Sphinx3 benchmark segmented when built and ran with -Ofast and
> >> -fprefecth-loop-arrays.
> >
> > [...]
> >
> >> In my case the register 367 is sNAN.
> >
> >
> > -Ofast implies -ffast-math which implies -ffinite-math-only:
> > ? ?Allow optimizations for floating-point arithmetic that assume that
> > ? ?arguments and results are not NaNs or +-Infs.
> >
> > so I am not sure what you expect exactly.
>
> Irrespective of -ffast-math the .md file looks ok - the tree and RTL level
> mark their min/max as commutative, so if there is an error the error is
> that sminmax is used, not that the pattern for it has its operand marked
> as commutative (this may mean that without -fno-signed-zeros and
> -ffinite-math-only [s]minmax cannot be used on x86).
Since I compile with -Ofast it sets -finite-math-only. Then usage smax of pattern is correct.
But in my case smax (sNAN, x) is changed to smax (x, sNAN) at reload. And sNaN is returned as result.
Ok I will check see why sNAN is getting generated at the first place.
>
> Richard.
>
> > --
> > Marc Glisse