<div dir="ltr"><div><br>Hi Patosga,<br></div>you can control what type the operands are promoted to as follows:<br>AddPromotedToType (ISD::ADD, MVT::i1, MVT::i64);<br><div class="gmail_extra"><br></div><div class="gmail_extra">For the "Expand" case, I believe you'll find what you're looking for in the file:<br>lib/CodeGen/SelectionDAG/LegalizeDAG.cpp<br></div><div class="gmail_extra">and function SelectionDAGLegalize::ExpandNode(), but if I'm wrong here perhaps others can correct me.<br><br></div><div class="gmail_extra">Finally, MVT::f32 just states that the operand is a 32-bit single precision floating point type.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Nemanja<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Sun, Jun 5, 2016 at 11:05 PM, Pedro Lopes via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry, glad I'm in the right place.<br></div><div>Before I start, I want to state that I'm a beginer and I'm trying to develop a backend by adapting an existent target to my platform. <br></div><div><br>My first doubt is about the SelectionDAG and the TargetLowering class.  When I use, for example:<br></div><div><tt><span>setOperationAction</span></tt><span>(</span><span>ISD</span><span>::</span><span>ADD</span><span>,</span> <span>MVT</span><span>::i1</span><span>,</span><span> Promote</span><span>);<br><br></span></div><div><span>Is it correct to say that I'm promoting any operand used by the ISD::ADD node to a larger type? If so, what would that value type be?<br><br></span></div><div><span>If I use the same function with the expand as the third argument like below:<br></span><tt><span>setOperationAction</span></tt><span>(</span><span>ISD</span><span>::</span><span>FSIN</span><span>,</span> <span>MVT</span><span>::</span><span>f32</span><span>,</span> <span>Expand</span><span>);</span><span><br>What will the 
expansion look like, since I don´t provide any custom implementation of 
the n</span><span>ode? Also, what is the meaning of the MVT::f32 in this case?<br><br></span></div><div><span>Thanks,<br></span></div><div><span>Patosga</span><tt><span></span></tt><span></span></div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-06-05 19:16 GMT+01:00 Pierre Gagelin <span dir="ltr"><<a href="mailto:Pierre.Gagelin@myport.ac.uk" target="_blank">Pierre.Gagelin@myport.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi Patosga,<br><br></div>You are on the right place to ask your questions and get help!<br><br>Try to be more specific with your problem. We need some details to help you =)<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Pierre<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2016 at 18:12, via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello sir,<br>
<br>
I'm having some problems understading how llvm works. I'm following a concrete example and visualizing the DAG and the .s output and some stuff doesn´t seem to match.<br>
<br>
I sorry to bother you but I don´t know where I can expose my doubts and I wonder if you could redirect me to some discussion place where someone might help me.<br>
<br>
Thanks,<br>
Patosga<br>
<br>
_____________________________________<br>
Sent from <a href="http://llvm.1065342.n5.nabble.com" rel="noreferrer" target="_blank">http://llvm.1065342.n5.nabble.com</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br></div></div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>