<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jun 23, 2015 at 11:24 PM Demikhovsky, Elena <<a href="mailto:elena.demikhovsky@intel.com">elena.demikhovsky@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Chandler,<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">          >>  I re-generated the previously deleted test file test/CodeGen/X86/vector-shuffle-512-v8.ll
 and put it back into repository.</span><u></u><u></u></p>
<p class="MsoNormal">         > I don't understand why you are continuing to use the
<b><span style="color:#00b050">other tests</span></b><span style="color:#00b050">
</span>though?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <b><span style="color:#c0504d">The vector</span></b></span><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#c0504d">-shuffle-512-v16.ll has only
 4 tests. How do I check all other patterns without “other tests”?</span></b></p></div></div></blockquote><div>By adding patterns for the other tests?</div><div><br></div><div>You can look at vector-shuffle-{128,256}-v16.ll for ideas. If you write the test IR with no FileCheck lines at all, running the update script will add them for you.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><b><u></u><u></u></b></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal" style="margin-left:36.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">>>As far I understand, the vector-shuffle-512-v8.ll does not check correctness of the shuffles, it just checks that noting fails.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt">> That is pretty clearly not the case. The test is checking for specific instruction sequences on each pattern.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">>>And it should be re-generated after each optimization, right?</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36.0pt">> Yes, and most specifically the diff should show exactly what the change entailed.<u></u><u></u></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#c0504d">What about
</span></b><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#c0504d">vector-shuffle-512-v32.ll? You don’t want to generate 32! permutations, right?</span></b></p></div></div></blockquote><div>Certainly not. We don't have 32! permutations in vector-shuffle-256-v32.ll for example. The patterns should focus on common and basic patterns that you would expect programmers to want to write, and on specific tests of functionality in the vector shuffle lowering.</div><div><br></div><div>As an example, when we added support for advanced rotate and shift based lowerings, we added lots of patterns that exercise boundary conditions and interesting properties of rotates and shifts.</div><div><br></div><div>You can collect coverage for X86ISelLowering.cpp from running the particular tests and look at that to get ideas of missing patterns. Or you can do this the brute-force way by dropping asserts into various paths in the lowering code you're adding and making sure you hit them with the tests in the file.</div><div><br></div><div>-Chandler</div></div></div>