[Mesa-dev] [PATCH 2/2] nir/opcodes: Use fpclassify() instead of isnormal() for ldexp
Jason Ekstrand
jason at jlekstrand.net
Mon Jan 26 15:58:34 PST 2015
On Mon, Jan 26, 2015 at 3:33 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 01/26/2015 02:22 PM, Jason Ekstrand wrote:
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88806
> > ---
> > src/glsl/nir/nir_opcodes.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
> > index f54a017..3f21539 100644
> > --- a/src/glsl/nir/nir_opcodes.py
> > +++ b/src/glsl/nir/nir_opcodes.py
> > @@ -480,7 +480,7 @@ else
> > opcode("ldexp", 0, tunsigned, [0, 0], [tfloat, tint], "", """
> > dst = ldexp(src0, src1);
> > /* flush denormals to zero. */
> > -if (!isnormal(dst))
> > +if (fpclassify(dst) != FP_NORMAL)
>
> GCC documentation claims that isnormal is faster than fpclassify(x) ==
> FP_NORMAL. Do we care?
>
> If we care, we should provide isnormal() in macros.h.
>
For the moment that sounds like too much work.
>
> If not,
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
Thanks,
--Jason
>
> > dst = copysign(0.0f, src0);
> > """)
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150126/4c6dc481/attachment.html>
More information about the mesa-dev
mailing list