Sure. If we have a single, non canonical phi, and we create a canonical one, then we'll end up with one phi with a constant add inside the loop. <br><br>I would have expected it to be instcombine that would take that add and thread it up before the loop. <br><br><br>Having said that, instcombine doesn't look at loop depths so yes, it would probably be LSR (or indvars?)<br><br>James<br><div class="gmail_quote"><div dir="ltr">On Wed, 26 Aug 2015 at 18:54, Adam Nemet via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">anemet added a comment.<br>
<br>
In <a href="http://reviews.llvm.org/D12285#232977" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12285#232977</a>, @jmolloy wrote:<br>
<br>
> I have a patch in my queue to remove ExtendedIdx later - I can merge that into this one.<br>
<br>
<br>
Up to you, just wanted to make sure it does not stay there.<br>
<br>
Can you please also address my question regarding LSR vs. InstCombine?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D12285" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12285</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>