[Bug fortran/64207] vectorization report

Joost.VandeVondele at mat dot ethz.ch gcc-bugzilla@gcc.gnu.org
Sat Dec 6 10:44:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64207

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch
         Resolution|---                         |FIXED

--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
-fopt-info is the replacement for -ftree-vectorizer-verbose, the latter is
deprecated

for example try -fopt-info-vec-missed or -fopt-info-all

best is to keep the part to analyze rather simple, since it generates a lot of
info that isn't always easy to understand:

> cat t.f90
subroutine s(a,b,c) 
  real, dimension(1024, 1024) :: a,b,c
  do i=1,1024    
    do j=1,1024
      c(i,j) = a(j,i)*b(j,i)
    end do
  end do
end subroutine

> gfortran -c -O3 -march=native -ffast-math -fopt-info-vec-missed t.f90
t.f90:3:0: note: not vectorized: complicated access pattern.
t.f90:3:0: note: bad data access.
t.f90:4:0: note: not consecutive access *c_19(D)[_10] = _18;

t.f90:4:0: note: not vectorized: complicated access pattern.
t.f90:4:0: note: bad data access.
[...]

> cat t.f90
subroutine s(a,b,c) 
  real, dimension(1024, 1024) :: a,b,c
  do i=1,1024    
    do j=1,1024
      c(j,i) = a(j,i)*b(j,i)
    end do
  end do
end subroutine

> gfortran -c -O3 -march=native -ffast-math  -fopt-info-vec  t.f90
t.f90:4:0: note: loop vectorized
t.f90:4:0: note: loop peeled for vectorization to enhance alignment



More information about the Gcc-bugs mailing list