Varun Patil via llvm-dev
2016-Nov-07 11:50 UTC
[llvm-dev] About trigonometric Instructions
HI developers, I want to add trigonometric instructions in my instrinfo.td files how can i directly map these instructions in .td files. Please help me Guys.For Sin, Cos, Tan and Cot Instructions. If I used llvm.sin.* as SDNode Then it is error as llvm variable is not defined SO please Help me. Thanks and Regards Varun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161107/11f444af/attachment.html>
Ryan Taylor via llvm-dev
2016-Nov-07 11:57 UTC
[llvm-dev] About trigonometric Instructions
Some of these SDnodes are already defined in ISDOpcodes.h (FSIN, FCOS and also FSINCOS), so just map from them. For the others you can add an intrinsic (this is how we've done it) and map from those (or you could add the ISD yourself). -Ryan On Mon, Nov 7, 2016 at 6:50 AM, Varun Patil via llvm-dev < llvm-dev at lists.llvm.org> wrote:> HI developers, > > I want to add trigonometric instructions in my instrinfo.td files how > can i directly map these instructions in .td files. Please help me Guys.For > Sin, Cos, Tan and Cot Instructions. > > If I used llvm.sin.* as SDNode Then it is error as llvm variable is not > defined SO please Help me. > > > Thanks and Regards > Varun > > _______________________________________________ > 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/20161107/e51ed434/attachment.html>
Ryan Taylor via llvm-dev
2016-Nov-07 12:12 UTC
[llvm-dev] About trigonometric Instructions
If you have a call to 'sin(float)', you should see ISD::FSIN in the DAG (-view-isel-dags) if this is legal for your target (ie you're not expanding or customizing in XXXISelLowering). For the others, if you create the intrinsic you should see the same thing in your DAG (ie not a call, a node like 'llvm.tan', or whatever you call it). -Ryan On Mon, Nov 7, 2016 at 7:00 AM, Varun Patil <varun.patil40 at gmail.com> wrote:> Ok thank you Ryan I will try this > > > > Thanks and Regards > Varun > > On Mon, Nov 7, 2016 at 5:27 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> Some of these SDnodes are already defined in ISDOpcodes.h (FSIN, FCOS and >> also FSINCOS), so just map from them. >> >> For the others you can add an intrinsic (this is how we've done it) and >> map from those (or you could add the ISD yourself). >> >> -Ryan >> >> On Mon, Nov 7, 2016 at 6:50 AM, Varun Patil via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> HI developers, >>> >>> I want to add trigonometric instructions in my instrinfo.td files how >>> can i directly map these instructions in .td files. Please help me Guys.For >>> Sin, Cos, Tan and Cot Instructions. >>> >>> If I used llvm.sin.* as SDNode Then it is error as llvm variable is not >>> defined SO please Help me. >>> >>> >>> Thanks and Regards >>> Varun >>> >>> _______________________________________________ >>> 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/20161107/7fce09a5/attachment.html>