<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/30/2013 03:33 PM, reed kotler
wrote:<br>
</div>
<blockquote cite="mid:52211DB3.6060808@mips.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
What C code would you use to get the following intrinsics to be
emitted?<br>
<br>
<pre style="overflow-x: auto; overflow-y: hidden; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15px; padding: 0.5em; border: 1px solid rgb(204, 204, 204); background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">declare float @llvm.pow.f32(float %Val, float %Power)
declare double @llvm.pow.f64(double %Val, double %Power)
</pre>
<br>
</blockquote>
<br>
I was wondering something similar recently. Why doesn't clang
provide a math.h that emits the llvm math intrinsics instead of
calls to the libc functions?<br>
<br>
For <br>
#include <math.h><br>
double foo(double y) { return exp(y); }<br>
<br>
I get a call to an external function instead of llvm.exp.f64<br>
</body>
</html>