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

           Summary: IVOPTs makes a mess out of polyhedron air derivx and
                    derivy
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rgue...@gcc.gnu.org


SUBROUTINE DERIVX(D,U,Ux,Al,Np,Nd,M)
      IMPLICIT REAL*8(A-H,O-Z)
      PARAMETER (NX=150,NY=150)
      DIMENSION D(NX,33) , U(NX,NY) , Ux(NX,NY) , Al(30) , Np(30)
      DO jm = 1 , M
         jmax = 0
         jmin = 1
         DO i = 1 , Nd
            jmax = jmax + Np(i) + 1
            DO j = jmin , jmax
               uxt = 0.
               DO k = 0 , Np(i)
                  uxt = uxt + D(j,k+1)*U(jmin+k,jm)
               ENDDO
               Ux(j,jm) = uxt*Al(i)
            ENDDO
            jmin = jmin + Np(i) + 1
         ENDDO
      ENDDO
      CONTINUE
      END

it ends up inserting loads of code into the pre-header blocks of the loops,
seemingly for rewriting of the loop exit tests.

As a result of this air runs about 25% slower when compiled with GCC compared
to ICC.

Reply via email to