http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52580

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-14 
14:32:49 UTC ---
Confirmed, 4.7 does

418: LOOP VECTORIZED.
398: LOOP VECTORIZED.
335: LOOP VECTORIZED.
316: LOOP VECTORIZED.
280: LOOP VECTORIZED.
262: LOOP VECTORIZED.
213: LOOP VECTORIZED.

vs.

398: LOOP VECTORIZED.
335: LOOP VECTORIZED.
213: LOOP VECTORIZED.

and different amount of alias checks as well.

For the loop at line 316 trunk cannot determine the dependence of some
refs:

316: versioning for alias required: can't determine dependence between
__BLNK__.uold[D.2769_24] and __BLNK__.vnew[D.2782_49]

Reduced testcase:

      SUBROUTINE CALC2
      IMPLICIT REAL*8   (A-H, O-Z)
      PARAMETER (N1=1335, N2=1335)

      COMMON  U(N1,N2), V(N1,N2), P(N1,N2),
     *        UNEW(N1,N2), VNEW(N1,N2),
     1        PNEW(N1,N2), UOLD(N1,N2),
     *        VOLD(N1,N2), POLD(N1,N2),
     2        CU(N1,N2), CV(N1,N2),
     *        Z(N1,N2), H(N1,N2), PSI(N1,N2)
      COMMON /CONS/ DT,TDT,DX,DY,A,ALPHA,ITMAX,MPRINT,M,N,MP1,
     1              NP1,EL,PI,TPI,DI,DJ,PCF
      TDTS8 = TDT/8.D0
      TDTSDX = TDT/DX
      TDTSDY = TDT/DY

      DO 200 J=1,N
      DO 200 I=1,M
      UNEW(I+1,J) = UOLD(I+1,J)+
     1    TDTS8*(Z(I+1,J+1)+Z(I+1,J))*(CV(I+1,J+1)+CV(I,J+1)+CV(I,J)
     2       +CV(I+1,J))-TDTSDX*(H(I+1,J)-H(I,J))
      VNEW(I,J+1) = VOLD(I,J+1)-TDTS8*(Z(I+1,J+1)+Z(I,J+1))
     1       *(CU(I+1,J+1)+CU(I,J+1)+CU(I,J)+CU(I+1,J))
     2       -TDTSDY*(H(I,J+1)-H(I,J))
      PNEW(I,J) = POLD(I,J)-TDTSDX*(CU(I+1,J)-CU(I,J))
     1       -TDTSDY*(CV(I,J+1)-CV(I,J))
  200 CONTINUE
      RETURN
      END

Reply via email to