[LLVMdev] llvm.exp.f32 didn't work

空明流转 wuye9036 at gmail.com
Fri Mar 30 19:50:03 PDT 2012


Hi,

I found that llvm.exp.f32 didn't work but sqrt works well.

I implemented a function like

define inlinehint float "my_exp"(float %.value) {
.body:
  %0 = call float @llvm.exp.f32(float %.value)
  ret float %0
}

declare float @llvm.exp.f32(float) nounwind readonly

But it generates following ASM:

00280072  movups      xmm0,xmmword ptr [esp+8]
00280077  movss       dword ptr [esp],xmm0
0028007C  call        00000000
00280081  pop         eax

As you seen, line 0028007C will call CRT exp I think, but it calls NULL
pointer.

But sqrt is right.

005000D1  movss       xmm0,dword ptr [esp+0Ch]
005000D7  movss       dword ptr [esp],xmm0
005000DC  call           00490018
005000E1  mov           eax,dword ptr [esp+8]

Could you give me some help ? Thanks !

-- 
Ye Wu
CELL: +86 159 9957 0103
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120331/8bcd4449/attachment.html>


More information about the llvm-dev mailing list