This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
vectorization stride -1
- From: Tim Prince <tprince at myrealbox dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Date: Tue, 01 May 2007 06:02:44 -0700
- Subject: vectorization stride -1
- Reply-to: tprince at computer dot org
Do we have any way to persuade gfortran to vectorize stride -1 ? e.g.
a(n:2:-1)= a(n-1:1:-1)+b(n-1:1:-1)
(from netlib vector Levine-Callahan-Dongarra benchmark), which has to be
vectorized at stride -1 to deal with the operand overlap. Ideally,
a(2:n)= a(:n-1) + b(:n-1)
would generate the same code. ifort vectorizes it with a temporary, and
doesn't perform as well on Core 2 Duo as gfortran does with the first
version.