<div dir="ltr">A couple months ago, I filed this bug against gcc not recognizing that sincos sets errno.  <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80042">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80042</a><div><br></div><div>The x86 backend will use the fsincos instruction if both sin and cos are used in code and sse is disabled. I think this is independent of whether sincos function is used.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Thu, May 18, 2017 at 8:29 AM, Stephen Canon via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><blockquote type="cite">On May 18, 2017, at 10:20 AM, René J.V. Bertin via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></blockquote><div><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">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.</span></div></blockquote><br></div></span><div>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.</div><div><br></div><div>– Steve</div></div><br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>