gfortran -O2 -ftree-vectorize -ftree-vectorizer-verbose=2 -c -v s243.f The first array assignment is vectorized. The second, which involves overlap between source and destination, should be no problem to vectorize as long as the loop is not reversed. Significant advantage should be gained by fusion.
Simplified from http://www.netlib.org/benchmark/vectors -- Summary: can't determine dependence (source/destination overlap) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tprince at computer dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32377