[llvm] r203734 - Fix vectorizer docs.
Chandler Carruth
chandlerc at google.com
Wed Mar 12 16:36:38 PDT 2014
On Wed, Mar 12, 2014 at 4:23 PM, Arnold Schwaighofer <
aschwaighofer at apple.com> wrote:
> Fix vectorizer docs.
>
> This example is not vectorized because LLVM does not prove no-wrapping of
> "a[i*7] += ...".
>
See my other email, but...
>
> - int foo(int *A, int *B, int n, int k) {
> - for (int i = 0; i < n; ++i)
> - A[i*7] += B[i*k];
> + int foo(int * A, int * B, int n) {
> + for (intptr_t i = 0; i < n; ++i)
> + A[i] += B[i*4];
>
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.
Also, spaces on both sides of the '*'? ;]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140312/7a953e26/attachment.html>
More information about the llvm-commits
mailing list