This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47341] New: unnecessary versioning in the vectorizer.
- From: "Joost.VandeVondele at pci dot uzh.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jan 2011 10:50:47 +0000
- Subject: [Bug middle-end/47341] New: unnecessary versioning in the vectorizer.
- Auto-submitted: auto-generated
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).