[llvm-dev] add intrinsic function support for customized backend

Xiangyang Guo via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 22 13:14:38 PDT 2015


I just put the definition of int_foo in file include/llvm/IR/Intrinsics.td
like this "def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty,
llvm_i32_ty], [IntrReadArgMem]>;", is that a problem? Is a separate file
IntrinsicsMyTarget.td necessary in this case?

Thanks

2015-10-22 16:08 GMT-04:00 Tim Northover <t.p.northover at gmail.com>:

> On 22 October 2015 at 11:50, Xiangyang Guo via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >                       [(set i32:$dst, (int_foo i32:$src1, i32:$src2))]> {
>
> What's your definition of int_foo? It should be coming from
> include/llvm/IR/IntrinsicsXYZ.td. If the expected name and types don't
> match up with that .td file LLVM tends to just assume you meant a real
> call.
>
> Also, make sure you've included IntrinsicsXYZ.td in Intrinsics.td.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151022/7fee43ab/attachment.html>


More information about the llvm-dev mailing list