<div dir="ltr"><div>Many of the older autoupgrades have no test cases because I think when we upgraded them we just replace all the code in the tests with native IR. So for some of the code we don't even know if it works.<br></div><div><br></div>I don't really want to watch the amount of code here continue to grow indefinitely. It's pretty poorly structured and has been up against the MSVC cascaded if/else limit a couple times. I think they allow about 128. Of course this is fixable by better structuring, but we'd probably want to fix the lack of tests to be more confident about not breaking it.<div><br></div><div>The ridiculous number of string compares in the code might be slow, but I'm not sure. I've never tried to profile it. We don't divide up the string compares based on first letters or anything so I think we run through a lot of memcmps.<br><div><br></div><div><div>Unfortunately, the bulk of the upgrade code was added in the 3.7, 3.9, 4.0 timeframe so the big reduction in code probably requires several more years. But I wanted to start a conversation about what our compability story looks like going forward.</div></div></div></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 Wed, Sep 20, 2017 at 12:31 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is there a reason why?<br>IE is it hard to maintain, slow, or are you just worried it will break? or something else?<div><br></div><div>(I'm not opposed in any way, literally just want to understand the motivation)</div><div><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Sep 20, 2017 at 12:20 PM, Craig Topper 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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>We have quite a lot of code in AutoUpgrade.cpp to upgrade X86 intrinsics that have been replaced with native IR over the years. Has enough time and/or versions passed that we can begin phasing out some of this code?</div><div><br></div><div>As I'm writing these we don't seem to have tests for a lot of the older upgrades. We've done better at this in the last few years.</div><div><br></div><div>3.1 added upgrade for:</div><div>x86.sse2.pcmpeq.* - we have almost no test cases for this</div><div>x86.sse2.pcmpgt.* - we no test cases for this</div><div>x86.avx2.pcmpeq.* - we have no test cases</div><div>x86.avx2.pcmpgt.* - we have no test cases for this</div><div>x86.avx.vpermil.* - we do test this</div><div><br></div><div>3.2 added upgrade for:</div><div>x86.avx.movnt.* - we have tests for this</div><div>x86.xop.vpcom* - we have tests for this</div><div>x86.sse41.ptest.* had its signature chagned and we upgrade from the old signature. We don't have tests for the old signature.</div><div>x86.xop.vfrcz.ss/sd had an argument dropped that we upgrade for. We don't have any tests for the old signature.</div><div><br></div><div>3.3 had no upgrades</div><div><br></div><div>3.4 removed:</div><div>x86.sse42.crc32.64.8 we do have tests that use it</div><div><br></div><div>For the complete list of intrinsic upgrade support, there's an annotated list in ShouldUpgradeX86Intrinsic in AutoUpgrade.cpp</div><span class="m_8648527886154158176HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_8648527886154158176m_-9141327994985433605gmail_signature">~Craig</div></div>
</font></span></div>
<br></div></div>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>