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 5: Another one out of the "unhandled data-ref" grab bag.


L.S.,

This code:

      SUBROUTINE S(N)
      DIMENSION A(N), B(12)
      COMMON /COM/ B
      DO I = 1, 12
         A(I) = B(I)
      ENDDO
      PRINT*,A(1:12)
      END

when compiled thusly:

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

draws the dreaded "unhandled data-ref" message:

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

Hmmm, this is rather common (pun intended) in old Fortran code.
Why is this style "punished" by not being vectorizable ;-) ?

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]