[llvm-dev] Intrinsic opt failure

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 16 07:07:38 PST 2016

On 2/16/2016 8:44 AM, Konstantin Vladimirov via llvm-dev wrote:
> CI->getArgOperand(0) returns operand with type (double*) rather then
> double, because in our ABI doubles are passed via memory.

The LLVM intrinsics in the LLVM IR must conform to whatever the IR's 
requirements are. That means that even in the case of your backend, the 
arguments to the intrinsic must be doubles, not their addresses.  You 
can convert the intrinsics to function calls, together with the call 
frame set up, etc. during instruction selection.

Check setLibcallName, setLibcallCallingConv (and related functions) in 
include/llvm/Target/TargetLowering.h.  The Libcall enum is defined in 


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation

More information about the llvm-dev mailing list