Mohamed Shafi via llvm-dev
2017-Nov-30 13:56 UTC
[llvm-dev] overloading single argument intrinsics
Hi, I am trying to overload a target specific intrinsic that takes just one argument. void llvm.target.my_intrin (int); void llvm.target.my_intrin (float); Looking at the various TD files i realize that the intrinsic f/w requires at-least 2 arguments (including return type) in order to specify overloading of the intrinsic. I wanted to confirm if it is possible to overload an intrinsic that has just one argument. I guess otherwise i will have to support two variants of the intrinsics. Regards, Shafi
Nemanja Ivanovic via llvm-dev
2017-Nov-30 17:30 UTC
[llvm-dev] overloading single argument intrinsics
I'm not sure where this "2-argument" requirement comes from. Can you not define it using something like: `def int_target_myintrin : Intrinsic<[], [llvm_any_ty], ...>` On Thu, Nov 30, 2017 at 2:56 PM, Mohamed Shafi via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > I am trying to overload a target specific intrinsic that takes just > one argument. > > void llvm.target.my_intrin (int); > void llvm.target.my_intrin (float); > > Looking at the various TD files i realize that the intrinsic f/w > requires at-least 2 arguments (including return type) in order to > specify overloading of the intrinsic. I wanted to confirm if it is > possible to overload an intrinsic that has just one argument. I guess > otherwise i will have to support two variants of the intrinsics. > > Regards, > Shafi > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171130/da3d6aff/attachment.html>