This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

vectorization stride -1


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]