[PATCH] Induction variables: support arbitrary constant step

Nadav Rotem nrotem at apple.com
Fri Oct 31 10:19:01 PDT 2014


Hi Alexey, 

Did you verify the correctness and the performance impacts of this patch? You should run the LLVM test suite with your changes. 

This patch looks very suspicious.  The test that you are chancing (example13) has code that looks like this: 

    for (j = 0; j < N; j+=8) {
      diff += (a[i][j] - b[i][j]);
    }

How are you generating consecutive vector loads?   This looks like a bug.  Also, you did not explain what programs you are expecting to vectorize and how. This is a huge patch and you should explain what changes you made and why. 

-Nadav



> On Oct 31, 2014, at 5:25 AM, Alexey Volkov <avolkov.intel at gmail.com> wrote:
> 
> Hi nadav, hfinkel,
> 
> Now for induction variables it's possible to have only -1 and +1 step values.
> This patch adds support for other than +1 and -1 constant step values.
> 
> http://reviews.llvm.org/D6051
> 
> Files:
>  lib/Transforms/Vectorize/LoopVectorize.cpp
>  test/Transforms/LoopVectorize/const-induction.ll
>  test/Transforms/LoopVectorize/gcc-examples.ll
> <D6051.15609.patch>





More information about the llvm-commits mailing list