title: Gather and Scatter intrinsics in the Loop Vectorizer with llvm
body: <p>I am trying to generate scatter/gather example in with llvm with no success. I am running the next example as mentioned in the llvm <a href="https://llvm.org/docs/Vectorizers.html#scatter-gather" rel="nofollow noreferrer">doc</a>:</p>
  
  <pre><code>int foo(int * A, int * B, int n) {
    for (intptr_t i = 0; i &lt; n; ++i)
        A[i] += B[i * 4];
  }
  </code></pre>
  
  <p>I am compiler with the next command line:</p>
  
  <pre><code>clang ./test.cpp -save-temps -O3 -march=skylake-avx512 -mllvm -force-vector-width=512
  </code></pre>
  
  <p>What am I doing wrong ?</p>