------- Comment #1 from rakdver at gcc dot gnu dot org 2007-08-19 20:08 ------- (In reply to comment #0) > In the following testcase: > > subroutine sub(aa,bb,n,m) > implicit none > integer, intent(in) :: n,m > real, intent(inout) :: aa(n,m) > real, intent(in) :: bb(n,m) > integer :: i,j > do i = 1,m > do j= 2,n > aa(i,j)= aa(i,j-1)+bb(i,j-1) > enddo > enddo > end subroutine > end > > The stride of the accesses in the inner-loop is a parameter (m is not a > compile-time known constant). As a result the data dataref analyzer reports: > " > failed: evolution of offset is not affine > ... > base_address: > offset from base address: > constant offset from base address: > step: > aligned to: > base_object: (*aa_54(D))[0] > symbol tag: SMT.25 > " > > Any chance that the dataref analysis can return an (invariant) expression in > "step", so that further analysis could continue? (for example, the access in > the outer-loop is consecutive, so if we had an expression to represent the > inner-loop stride, we could vectorize the outer-loop).
Making us return symbolic stride would not be hard. The problem is that data dependence analysis would fail anyway, since we cannot tell whether n is zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33113