[cfe-dev] builtin llvm.fma

Matt Arsenault Matthew.Arsenault at amd.com
Fri Aug 30 16:02:44 PDT 2013


On 08/30/2013 03:33 PM, reed kotler wrote:
> What C code would you use to get the following intrinsics to be emitted?
>
> declare float     @llvm.pow.f32(float  %Val, float %Power)
> declare double    @llvm.pow.f64(double %Val, double %Power)
>
>
>

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?

For
#include <math.h>
double foo(double y) { return exp(y); }

I get a call to an external function instead of llvm.exp.f64
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130830/6ab91a03/attachment.html>


More information about the cfe-dev mailing list