<div dir="ltr">That seems like a valid fix to me.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Fri, Oct 6, 2017 at 9:45 PM, Riyaz Puthiyapurayil 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_5744417439637583007WordSection1">
<p class="MsoNormal">Ignore the suggested fix in my earlier post. How about this?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-family:Consolas">diff --git a/lib/Target/X86/<wbr>X86ISelLowering.cpp b/lib/Target/X86/<wbr>X86ISelLowering.cpp<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">index 20c81c3..b8ebf42 100644<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">--- a/lib/Target/X86/<wbr>X86ISelLowering.cpp<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">+++ b/lib/Target/X86/<wbr>X86ISelLowering.cpp<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">@@ -1632,10 +1632,11 @@ X86TargetLowering::<wbr>X86TargetLowering(const X86TargetMachine &TM,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> if (!Subtarget.is64Bit()) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // These libcalls are not available in 32-bit.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> setLibcallName(RTLIB::SHL_<wbr>I128, nullptr);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> setLibcallName(RTLIB::SRL_<wbr>I128, nullptr);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> setLibcallName(RTLIB::SRA_<wbr>I128, nullptr);<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-family:Consolas;color:#00b050">+ setLibcallName(RTLIB::MUL_<wbr>I128, nullptr);<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-family:Consolas"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // Combine sin / cos into one node or libcall if possible.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> if (Subtarget.hasSinCos()) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> setLibcallName(RTLIB::SINCOS_<wbr>F32, "sincosf");<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span style="font-family:Consolas">This will make the Legalizer choose the brute force approach below:<u></u><u></u></span></i></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">void DAGTypeLegalizer::<wbr>ExpandIntRes_MUL(SDNode *N,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> <wbr> SDValue &Lo, SDValue &Hi) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">...<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> <b>if (LC == RTLIB::UNKNOWN_LIBCALL || !TLI.getLibcallName(LC)) {<u></u><u></u></b></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // We'll expand the multiplication by brute force because we have no other<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // options. This is a trivially-generalized version of the code from<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // Hacker's Delight (itself derived from Knuth's Algorithm M from section<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> // 4.3.1).<u></u><u></u></span></p>
</div>
</div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>