https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86054

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
            Version|unknown                     |8.1.1
         Resolution|---                         |INVALID
   Target Milestone|---                         |8.2
            Summary|[8.1/9 Regression] SPEC     |[8/9 Regression] SPEC
                   |CPU2006 416.gamess          |CPU2006 416.gamess
                   |miscompare after r259592    |miscompare after r259592
                   |with march=skylake-avx512   |with march=skylake-avx512

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The rev. in question is just a costing change which means it uncovers
previously latent issues.

Note I wonder why not vectorizing helps here because niter analysis should
conclude from

        DIMENSION A(5, 1), B(2, W, H), C(W, H, 3)

        DO I=1, H
          DO J=1, W
            C(J, I, 1)=B(2, J, I)*A(4, J)
            C(J, I, 2)=1.0d0
            C(J, I, 3)=1.0d0
          END DO
        END DO

that the J loop only runs once via the access to A(4, J).  I guess due
to the lowering to a 1-dim array that somehow doesn't work but it works
when vectorized.

As this is clearly invalid code there's nothing we can do about this
(but close it as dup of one of the many gamess bugs about this or
related issues like PR56993 or PR53086).

I believe a workaround is -fno-aggressive-loop-optimizations and/or
-funconstrained-commons

Reply via email to