search for: __builtin_inf

Displaying 3 results from an estimated 3 matches for "__builtin_inf".

2020 Sep 13
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
...mpletes successfully with optimizations off, and aborts with LLVM's optimization follows; -fmath-errno does not help, and it is not expected to, because it is designed to retain setting errno to non-zero (not to prevent spuriously setting errno). #include <errno.h> volatile double inf = -__builtin_inf(); double pow(double, double); void abort(void); int main(void) { errno = 0; pow(inf, 0.5); if (errno != 0) abort(); } Compiler Explorer link: https://godbolt.org/z/5Wr66M Is the transformation actually valid in some way? If not, I see no instances where the LibCallSimplier generates condi...
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
...ts with LLVM's >> optimization follows; -fmath-errno does not help, and it is not expected >> to, because it is designed to retain setting errno to non-zero (not to >> prevent spuriously setting errno). >> >> #include <errno.h> >> volatile double inf = -__builtin_inf(); >> >> double pow(double, double); >> void abort(void); >> int main(void) { >> errno = 0; >> pow(inf, 0.5); >> if (errno != 0) abort(); >> } >> >> Compiler Explorer link: https://godbolt.org/z/5Wr66M >> >> Is the transf...
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
...follows; -fmath-errno does not help, and it is not >>>> expected to, because it is designed to retain setting errno to non-zero >>>> (not to prevent spuriously setting errno). >>>> >>>> #include <errno.h> >>>> volatile double inf = -__builtin_inf(); >>>> >>>> double pow(double, double); >>>> void abort(void); >>>> int main(void) { >>>> errno = 0; >>>> pow(inf, 0.5); >>>> if (errno != 0) abort(); >>>> } >>>> >>>> Comp...