<div dir="ltr">And are such intrinsics, as memset, memcpy, memmove replaced by standard library calls? This is said in sources, that it looks for such functions in global symbol table.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-11 20:16 GMT+02:00 Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 7/11/2017 10:26 AM, Anastasiya Ruzhanskaya via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
I would like to find out a detail about intrinsics functions. When I use memset form a standard library it is always converted to llvm's memset, however the usage of some others as sqrt, pow, sin do not lead to the same. How can I get the same effect?<br>
</blockquote>
<br></span>
For math functions in particular, the intrinsics don't really match the semantics of the actual C library functions, so clang doesn't normally convert them.  (If you use -ffast-math, clang will convert them anyway.)  This is an area which could probably be improved, but it's complicated because we depend on the host's libm.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why there is no overall LLVM pass like IntrinsicLowerinPass.cpp (it has only some specific ones)? There is only a function that does this.<br>
</blockquote>
<br></span>
Some intrinsics expose functionality which can't be expressed using IR instructions.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</font></span></blockquote></div><br></div>