[LLVMdev] Optimization of sqrt() with invalid argument

Joerg Sonnenberger joerg at britannica.bec.de
Fri Sep 26 15:14:54 PDT 2014


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?

Joerg



More information about the llvm-dev mailing list