<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 4:23 PM, Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2hy" class="a3s" style="overflow:hidden">Fix vectorizer docs.<br>
<br>
This example is not vectorized because LLVM does not prove no-wrapping of<br>
"a[i*7] += ...".<br></div></blockquote><div><br></div><div>See my other email, but...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2hy" class="a3s" style="overflow:hidden">
<br>
-  int foo(int *A, int *B, int n, int k) {<br>
-    for (int i = 0; i < n; ++i)<br>
-      A[i*7] += B[i*k];<br>
+  int foo(int * A, int * B, int n) {<br>
+    for (intptr_t i = 0; i < n; ++i)<br>
+        A[i] += B[i*4];</div></blockquote></div><div class="gmail_extra"><br></div>I don't believe that this can possibly change whether or not any of this pointer arithmetic could possibly wrap. I mean... maybe I'm missing something blindly obvious and just have a think-o moment... but I *really* don't think this is remotely possible.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Also, spaces on both sides of the '*'? ;]<br><br></div></div>