[llvm-dev] About trigonometric Instructions

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 7 04:12:56 PST 2016


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>


More information about the llvm-dev mailing list