This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Vectorizing HIRLAM 3: Can't vectorize DOUBLE COMPLEX loops ...
- 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:25:33 +0200
- Subject: Vectorizing HIRLAM 3: Can't vectorize DOUBLE COMPLEX loops ...
L.S.,
The following code:
SUBROUTINE S(N)
DOUBLE COMPLEX A(N), B(N)
READ*,B
DO I = 1, N
A(I) = B(I)
ENDDO
PRINT*,A
END
when compiled thusly:
$ gfortran -g -S -O3 -ftree-vectorize -ftree-vectorizer-verbose=2 -msse2 vect3.f
draws the following "not vectorized" message:
vect3.f:4: note: not vectorized: no vectype for stmt: D.929_51 = (*b_8)[D.928_48] scalar_type: complex8
vect3.f:4: note: vectorized 0 loops in function.
Which begs the question: Why not vectorizing *after* complex computation has
been lowered to the equivalent floating point computation ?
HIRLAM contains relatively few complex computation - however, a sizable number
of physics problems are more easily expressed using (DOUBLE) COMPLEX
quantities. It seems they are on the short end of the rope as far as
vectorization is concerned.
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/