<br><br><div><span class="gmail_quote">2007/11/22, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>> Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and<br>> llvm.sin.*<br>> For example:<br>><br>> double foo(double x, double y) {<br>>   return pow(x,y);<br>> }<br>>
<br>> will compiled into ll:<br>><br>> define double @foo(double %x, double %y) {<br>>    %tmp3 = tail call double @pow( double %x, double %y )<br>>   ret double %tmp3<br>> }<br>><br>> This is not consistent with llvm language reference.
<br><br>first of all, this is logically wrong - the language reference<br>doesn't say anywhere that you *have* to use llvm.pow.* rather than<br>pow from the C library.  </blockquote><div><br>
Sure. But now the question is the llvm-gcc will not emit llvm.pow.* anytime.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Also, don't forget that the llvm intrinsics<br>don't set errno, so using them is only valid on systems/for languages
<br>for which errno is ignored.  That said, llvm.pow.* is for raising<br>to an integer power, and here you raise to a double power.</blockquote><div><br>
I don't understand. why we  can't  use llvm.pow.f64 for double power?<br>
<br>
Sheng. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ciao,<br><br>Duncan.<br></blockquote></div><br>