This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Vectorizing HIRLAM 2: One out of the "unhandled data-ref" garbage bin :-)


L.S.,

This code:

      SUBROUTINE S(A, B, N)
      DIMENSION A(N), B(N)
      READ*,Z,B
      DO I = 1, N
         A(I) = Z * B(I)
      ENDDO
      PRINT*,A
      END

when compiled thusly:

$ gfortran -g -S -O3 -ftree-vectorize -ftree-vectorizer-verbose=2 -msse2 vect2.f

draws the following "not vectorized" message:

vect2.f:4: note: not vectorized: unhandled data-ref 
vect2.f:4: note: vectorized 0 loops in function.

Hmmm, how about broadcasting Z to a vector register and using that in a
vectorized version of this loop :-) ?

Kind regards,

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/


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