<div dir="ltr"><div class="gmail_quote">On Mon, Mar 30, 2015 at 5:12 PM Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In <a href="http://reviews.llvm.org/D8565#149183" target="_blank">http://reviews.llvm.org/D8565#<u></u>149183</a>, @chandlerc wrote:<br>
<br>
> I'd like to understand why you opted for doing this in MI instead of at the IR level? In particular, it seems odd to have the loop vectorizer and other tools build vectorized code in the "wrong" way and then fix it if we can later.<br>
<br>
<br>
The extra swap instructions are not introduced until instruction selection, so the IR level is already correct.  The instruction selector is too myopic to view entire computation webs, so we have to be conservative and generate code that uses true-LE register representations, then clean up at a later time when we can see the big picture.  (So both the disease and the cure are introduced in the back end.)<br></blockquote><div><br></div><div>Ah, perfect. Just the explanation I was looking for. =D</div><div><br></div><div>So, in theory, we wouldn't need this with global isel. But that's in theory and today, we need this. Makes perfect sense, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D8565" target="_blank">http://reviews.llvm.org/D8565</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>