This is the mail archive of the
mailing list for the GCC project.
Re: [lno] [patch] vectorization with unknown loop bound
> >+ /* If the loop has symbolic number of iterations 'n'
> >+ (i.e. it's not a compile time constant),
> >+ then an epilog loop need to be created. We therefore duplicate
> >+ the initial loop. The original loop will be vectorized, and
> >will compute
> >+ (n/VF) iterations. The second copy will remain serial and
> >+ the remaining (n%VF) iterations. (VF is the vectorization
> >factor). */
> Any reason for not using nested loops approach here? e.g.
> for (i=0; i<N; i = i + VF)
> for (j=i; j < i + VF && j < N; j++)
> I am just curious.
1) You need to test one more condition per iteration of the inner
2) And you still cannot vectorize it (unless I miss something important).