[cfe-dev] clang does not use sincos with -O2 but gcc does

Stephen Canon via cfe-dev cfe-dev at lists.llvm.org
Thu May 18 08:29:25 PDT 2017


> On May 18, 2017, at 10:20 AM, René J.V. Bertin via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> To make matters even more complex: on Mac the situation is the opposite, that is clang always uses a sincos library function provided by Apple.

Right; Apple’s libm does not ever set `errno`, and defines math_errhandling to MATH_ERREXCEPT, so we don’t need to worry about `errno` on Apple platforms; further our `sincos` produces the same result as separate calls to `sin` and `cos` do, so this transform never perturbs observable results.

– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170518/d067c480/attachment.html>


More information about the cfe-dev mailing list