[LLVMdev] Optimization of sqrt() with invalid argument
Joerg Sonnenberger
joerg at britannica.bec.de
Sat Sep 27 01:04:12 PDT 2014
On Fri, Sep 26, 2014 at 03:23:15PM -0700, Reid Kleckner wrote:
> On Fri, Sep 26, 2014 at 3:14 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> > wrote:
>
> > On Fri, Sep 26, 2014 at 01:52:19PM -0500, Bill Schmidt wrote:
> > > At the least, we should constant-fold to NaN for the non fast-math sqrt
> > > calls...there's no point in going through the libcall overhead when we
> > > know the answer in advance. I can prepare a patch for that if everyone
> > > agrees.
> >
> > The crux is that sqrt(-1) can set errno, can't it?
> >
>
> I'm pretty sure -ffast-math means you don't care about that.
First quoted sentence from Bill is about non-fast-math.
Joerg
More information about the llvm-dev
mailing list