Displaying 1 result from an estimated 1 matches for "qignerrno".
2014 Sep 25
3
[LLVMdev] Optimization of sqrt() with invalid argument
...d versus unoptimized
code, which of course is allowable, but probably to be avoided when
possible.
However, there's a de facto standard of producing NaN for these cases.
The gcc and xlc compilers will optimize the call into a constant NaN,
given the right options (-O2 -ffast-math for gcc, -O2 -qignerrno for
xlc). All of gcc, icc, and xlc produce NaN via the library call with
unoptimized code. Choosing 0.0 for Clang/LLVM introduces an unnecessary
incompatibility.
This is important in practice because of the xalanc benchmark in SPEC
CPU2006. This code initializes a variable to a NaN value by ass...