<div dir="ltr">Thanks.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-13 3:54 GMT+04:00 Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Mar 12, 2014, at 4:36 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
<br>
><br>
> On Wed, Mar 12, 2014 at 4:23 PM, Arnold Schwaighofer <<a href="mailto:aschwaighofer@apple.com">aschwaighofer@apple.com</a>> wrote:<br>
> Fix vectorizer docs.<br>
><br>
> This example is not vectorized because LLVM does not prove no-wrapping of<br>
> "a[i*7] += ...".<br>
><br>
> See my other email, but...<br>
><br>
><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];<br>
><br>
<br>
<br>
> 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.<br>

><br>
<br>
<br>
</div></div>Wrapping only matters for store to load safety. As I explained in the other email, it is a matter of LLVM not being able to prove this atm. Not that this example is unsafe. It is not. The page describes examples that LLVM can vectorize so I took this example out :).<br>

<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">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/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>