[Bug middle-end/47341] New: unnecessary versioning in the vectorizer.
Joost.VandeVondele at pci dot uzh.ch
gcc-bugzilla@gcc.gnu.org
Tue Jan 18 11:40:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Summary: unnecessary versioning in the vectorizer.
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Joost.VandeVondele@pci.uzh.ch
with current trunk:
> cat test.f90
SUBROUTINE HARD_NN_4_4_4_5_1_2_4(C,A,B)
REAL(KIND=8) :: C(4,*)
REAL(KIND=8) :: B(4,*), A(4,*)
INTEGER ::i,j,l
l= 1
DO j= 1 , 4 , 2
DO i= 1 , 4 , 1
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+0)*B(l+0,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+1)*B(l+1,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+2)*B(l+2,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+3)*B(l+3,j+0)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+0)*B(l+0,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+1)*B(l+1,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+2)*B(l+2,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+3)*B(l+3,j+1)
ENDDO
ENDDO
END SUBROUTINE
> gfortran-trunk -c -O2 -fno-unroll-loops -ftree-vectorize -ftree-vectorizer-verbose=1 -march=core2 -msse4.2 test.f90
test.f90:7: note: created 1 versioning for alias checks.
test.f90:7: note: LOOP VECTORIZED.
test.f90:1: note: vectorized 1 loops in function.
The compiler should not need to generate various version of these loops. With
the bounds info provided, nothing can alias (I think).
More information about the Gcc-bugs
mailing list