[LLVMdev] JIT compiled intrinsics calls is call to null pointer

Taco H. in den Bosch taco at heddesit.nl
Tue Sep 17 23:32:53 PDT 2013


Hi everyone, 
I am trying to call an LLVM intrinsic (llvm.pow.f32), inserted with the 
following call:
std::vector<llvm::Type *> 
arg_types;arg_types.push_back(llvm::Type::getFloatTy(context));auto 
function=llvm::Intrinsic::getDeclaration(module, llvm::Intrinsic::pow, 
arg_types);auto result=ir_builder->CreateCall(function, args); 
 When I try to execute the code generated by the JIT compiler, I see that 
the intrinsic is not compiled into a math coprocessor instruction, but in a 
call to a null address: 
 002300B8  sub         esp,8  002300BB  movss       xmm0,dword ptr 
ds:[2300B0h]  002300C3  movss       dword ptr [esp+4],xmm0  002300C9  movss 
      xmm0,dword ptr ds:[2300B4h]  002300D1  movss       dword ptr 
[esp],xmm0  002300D6  call        00000000  002300DB  add         esp,8  
002300DE  ret  
 Is there anything special that I need to do in order to be able to call 
intrinsics, either in general or when JITting? I am either doing something 
wrong, or forgetting to do something, but I don't know what. 
 I am working with a Visual Studio compiled version on Windows (x86). 
 All hints will be appreciated, with kind regards,
Taco H. in den Bosch.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130918/5d669bb2/attachment.html>


More information about the llvm-dev mailing list