<div dir="ltr">On Thu, Jul 28, 2016 at 2:46 PM, Sanjoy Das via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<span class=""></span><br><span class=""></span><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>After rotating the inner loop, won't the program have to be<br>
<span class=""><br>
   for (int i = 0; i < m; ++i) {<br>
    x = A->at(n * i);<br>
    if (exception)<br>
      throw;<br>
    y = B->at(n*i);<br>
    if(exception)<br>
      throw;<br>
    res += x + y;<br>
</span>    for (int j = 1; j < n; ++j)  // << changed lower count<br>
<span class="">      res += A->at(n * i + j) + B->at(n * i + j);<br>
   }<br>
<br>
</span>Where is the redundancy here ^?<br>
<div class="HOEnZb"><div class="h5"><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank"></a></div></div></blockquote><div><br></div><div>If you look at the actual LLVM IR for the original C++ example, you'll see that some of the checks can be simplified because we can assume B is dereferencable.<br></div></div><br></div><div class="gmail_extra">-Eli<br></div></div>