This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Vectorizing HIRLAM 5: Another one out of the "unhandled data-ref" grab bag.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: fortran at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 21 Oct 2005 15:40:24 +0200
- Subject: 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/