<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Monaco;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Your English is fine, I think. Reading your reply, I didn’t really provide enough context.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There’s a straightforward API for generating libcalls which is usable in custom lowering: TargetLowering::makeLibCall.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">By “out of tree targets”, I mean targets which are maintained outside of the llvm.org infrastructure (whether or not they’re open-source). The developer policy (<a href="http://llvm.org/docs/DeveloperPolicy.html#test-cases">http://llvm.org/docs/DeveloperPolicy.html</a>)
says all features must be tested; there’s no reasonable way to test a feature that isn’t actually used by any target in the llvm.org tree. So we can’t accept any features unless they benefit at least one in-tree target. So if, for example, AVR would benefit
from an improvement to common infrastructure here, that would be fine. If it would only benefit some target you’re working on privately, we have to reject that patch.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It’s possible there’s some infrastructure improvement that would benefit targets like AVR. Changing ConvertNodeToLibcall by itself doesn’t seem to fall into that category; like you’ve noted, nothing would really use it on its own. Maybe
it makes sense to change the LowerOperation API? I’m not sure what exactly that would look like, though.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Eli<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Joan Lluch <joan.lluch@icloud.com> <br>
<b>Sent:</b> Tuesday, June 11, 2019 12:27 AM<br>
<b>To:</b> Eli Friedman <efriedma@quicinc.com><br>
<b>Cc:</b> llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> [EXT] Re: [llvm-dev] Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Eli,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">First of all, please I would appreciate that you try to not confuse my limited use of English with stupidity or lack or criteria in other subjects. I’m not English native, so please keep that in mind. You have been significantly helpful
in the recent past so please keep on.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Interestingly, you made a mention of a related but not identical issue. It is true that most (or all) processors support constant shift instructions so that LLVM can safely assume that
<i>constant</i> shifts are legal. I don’t think that LLVM makes any explicit assumption that variable shifts are legal too though, but if it does, then this is not either a problem. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">We need to make the distinction between constant shifts and variable shifts. The later are generally supported only by the major processors, but not in the general case. In particular the AVR and the MSP430 targets do not have native support
for them. In both cases variable shifts are dealt with by means of a custom inserter. This is just a possible way to implement them, but not the easiest or the cleaner one in my opinion.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Another possibility is to implement Custom lower for constant shifts, but to generate a lib call (or an intrinsic) for the variable shifts. The lib call can be generated as part of the Custom lowering, and this is the implementation that
I chose for my target, however, the LLVM infrastructure does not make this particularly straightforward for two reasons: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- First, there’s no working support for ‘LibCall’ lowering of shifts, this is broken by the omission of the case statement that I mentioned, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Second, there’s no simple way that I am aware to make LLVM to create a lib call from the Custom lowering implementation; <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am not going to strongly suggest how to solve this problem, but just to state that there’s an actual problem or at least an oddity on the way that shifts are (or can be) dealt with.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">To me, the first thing we need to do is to actually have LibCall operationActions
<i>working</i> for shifts. This is also as a matter of code consistency if you want, and doing this alone doesn’t break anything: ultimately it’s the responsibility of the target to chose whether it uses it or not.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Additionally, we should specify a way to fall through to LibCall lowering from a Custom lower implementation, if required or requested by the target. For example by providing a public path or a hook to ConvertNodeToLibCall, and/or by making
the Custom implementation returning something that is recognised by the SelectionDAGLegalize code as a request for a LibCall fall through. Currently, the fall through mechanism after Custom lowering goes directly to the Expand code<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Yet another approach would be that LLVM would explicitly made a distinction between constant and variable shifts, so that they can be lowered in separated ways, but I rather prefer the approach above because it’s more generic and it would
widen the custom lowering implementation possibilities for targets with partial support of LLVM instructions.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">In my opinion, it’s not right to consider any "out of tree targets", (whatever that means) as not worth for LLVM improvement. The LLVM project has traditionally focused on major processors for a good reason, but the grow of the IoT and
the recent popularisation of many 8 and 16 bit architectures for embedded and control applications make it worth a LLVM focus shift to the particular needs of these smaller processors. Incidentally, the AVR and the MSP430 still remain as ‘experimental’ targets.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Just my two cents anyway, and sorry for my English.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">John Lluch<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 11 Jun 2019, at 02:16, Eli Friedman <<a href="mailto:efriedma@quicinc.com">efriedma@quicinc.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">The legalization itself is simple; the issue all the places that assume shifts are legal. For example, you probably don’t want “a+a” to become a libcall.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-Eli<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b>From:</b><span class="apple-converted-space"> </span>Joan Lluch <<a href="mailto:joan.lluch@icloud.com">joan.lluch@icloud.com</a>><span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Monday, June 10, 2019 3:05 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>Eli Friedman <<a href="mailto:efriedma@quicinc.com">efriedma@quicinc.com</a>><br>
<b>Cc:</b><span class="apple-converted-space"> </span>llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b><span class="apple-converted-space"> </span>[EXT] Re: [llvm-dev] Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Hi Eli,<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Thanks for pointing to the CTLZ_ZERO_UNDEF “LibCall” implementation. I have not it in the version that I am currently using, so it’s nice to know that it’s implemented now. <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Incidentally, the CTLZ… implementation is IDENTICAL to what I am proposing for the Shifts. This is not just adding support for “out-of-tree-targets”, but giving consistency to the fact that we have perfectly defined LibCalls for Shifts,
but they can’t be used because there’s an omission in the sources.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I only proposed to add a missing case statement to the ConvertNodeToLibCall.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">To my understanding this is totally harmless to any existing or future targets because all what it does is to call the Library function when setOperationAction is set to “LibCall”. This is not different that any other case, and you just
confirmed that you added the same for the CTLZ… functions. So I do not understand what you mean by “terrible quality in a lot of cases”: Targets with native shift support are not affected, and neither are targets with custom lowering.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I would suggest that you look in more detail at the actual implementation of the ConvertNodeToLibCall and from where it is called and its actual purpose. There’s nothing else required. So I would appreciate that you elaborate on why you
think that this is not a good idea.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">John Lluch<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">On 10 Jun 2019, at 21:09, Eli Friedman <<a href="mailto:efriedma@quicinc.com"><span style="color:purple">efriedma@quicinc.com</span></a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">All in-tree targets have variable shift instructions for native integer types, except for AVR. And AVR implements custom lowering. I’m not sure what else would be required to actually make marking a shift as “libcall” actually work well;
technically, the change you’re proposing might produce valid code, but it would be terrible quality in a lot of cases. So I’m not eager to add partial support just for out-of-tree targets.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Marking CTLZ_ZERO_UNDEF as “LibCall” was implemented in<span class="apple-converted-space"> </span><a href="https://reviews.llvm.org/D47917"><span style="color:#954F72">https://reviews.llvm.org/D47917</span></a><span class="apple-converted-space"> </span>.
Probably straightforward to extend that to cover CTTZ_ZERO_UNDEF and CTPOP.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-Eli<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<div>
<p class="MsoNormal"><b>From:</b><span class="apple-converted-space"> </span>llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org"><span style="color:purple">llvm-dev-bounces@lists.llvm.org</span></a>><span class="apple-converted-space"> </span><b>On Behalf
Of<span class="apple-converted-space"> </span></b>Joan Lluch via llvm-dev<br>
<b>Sent:</b><span class="apple-converted-space"> </span>Monday, June 10, 2019 8:31 AM<br>
<b>To:</b><span class="apple-converted-space"> </span>llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org"><span style="color:purple">llvm-dev@lists.llvm.org</span></a>><br>
<b>Subject:</b><span class="apple-converted-space"> </span>[EXT] [llvm-dev] Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">LLVM appears to support Library functions for <span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187;background:white">ISD</span><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white">::<span style="color:#31595D">SRA </span></span>,<span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187;background:white">ISD</span><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white">::<span style="color:#31595D">SHL</span></span>,
and <span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187;background:white">ISD</span><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white">::<span style="color:#31595D">SRL</span></span>, as they are properly defined in
RuntimeLibCalls.def.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">The library functions defined in RuntimeLibCalls.def (among others) are these:<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif">HANDLE_LIBCALL(SRA_I16, "__ashrhi3")</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif">HANDLE_LIBCALL(SRA_I32, "__ashrsi3")</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif">HANDLE_LIBCALL(SRA_I64, "__ashrdi3")</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">However, setting<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif;color:#31595D">setOperationAction</span><span style="font-size:8.5pt;font-family:"Monaco",serif">(<span style="color:#4F8187">ISD</span>::<span style="color:#31595D">SRA</span>, <span style="color:#4F8187">MVT</span>::<span style="color:#31595D">i16</span>, <span style="color:#31595D">LibCall</span>);</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">in the TargetLowering constructor causes LLVM to stop with an assert as the shift instruction can’t be selected. <o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">The problem is in <span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187;background:white">SelectionDAGLegalize</span><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white">::ConvertNodeToLibcall </span>because
there’s no switch case for any of the Shift instructions. <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">The problem gets solved by just adding switch cases like this (and similar for the other shift instructions):<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif;color:#BA2DA2">case</span><span class="apple-converted-space"><span style="font-size:8.5pt;font-family:"Monaco",serif"> </span></span><span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187">ISD</span><span style="font-size:8.5pt;font-family:"Monaco",serif">::<span style="color:#31595D">SRA</span>:</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif"> Results.<span style="color:#31595D">push_back</span>(<span style="color:#31595D">ExpandIntLibCall</span>(Node,<span class="apple-converted-space"> </span><span style="color:#BA2DA2">false</span>,</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif"> <span class="apple-converted-space"> </span><span style="color:#4F8187">RTLIB</span>::<span style="color:#31595D">SRA_I16</span>,</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:8.5pt;font-family:"Monaco",serif"> <span class="apple-converted-space"> </span><span style="color:#4F8187">RTLIB</span>::<span style="color:#31595D">SRA_I16</span>,<span class="apple-converted-space"> </span><span style="color:#4F8187">RTLIB</span>::<span style="color:#31595D">SRA_I32</span>,</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white"> <span style="color:#4F8187">RTLIB</span>::<span style="color:#31595D">SRA_I64</span>,<span class="apple-converted-space"> </span><span style="color:#4F8187">RTLIB</span>::<span style="color:#31595D">SRA_I128</span>));</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">I think this is a BUG by omission of necessary switch cases.<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Similarly, the following ISD codes <span style="font-size:8.5pt;font-family:"Monaco",serif;color:#4F8187;background:white">ISD</span><span style="font-size:8.5pt;font-family:"Monaco",serif;background:white">::<span style="color:#31595D">CTTZ, </span><span style="color:#4F8187">ISD</span>::<span style="color:#31595D">CTLZ, </span><span style="color:#4F8187">ISD</span>::<span style="color:#31595D">CTPOP </span></span>do
not define any Library calls, despite LLVM being able to fully expand them into rather large code for targets that do not natively implement them.<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">I regard this also as an omission/bug, because not all targets would benefit from the custom expansion of these ISD codes, which as said can get unnecessarily long and costly. <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Instead, LLVM should have them available as possible LibCalls.<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Any comments or opinions on these subjects are appreciated<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Joan Lluch<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>