public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/52580] [4.8 Regression] 171.swim performance drop on x86 – vectorization doesn’t happen anymore
Date: Wed, 14 Mar 2012 14:41:00 -0000	[thread overview]
Message-ID: <bug-52580-4-mjBzMMZpV2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52580-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2012-03-14 14:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 17:09 [Bug fortran/52580] New: " vbyakovl23 at gmail dot com
2012-03-13 17:14 ` [Bug middle-end/52580] " burnus at gcc dot gnu.org
2012-03-14 10:26 ` rguenth at gcc dot gnu.org
2012-03-14 14:41 ` rguenth at gcc dot gnu.org [this message]
2012-03-14 14:55 ` rguenth at gcc dot gnu.org
2012-03-15 10:07 ` rguenth at gcc dot gnu.org
2012-03-15 10:37 ` rguenth at gcc dot gnu.org
2012-03-15 13:30 ` vbyakovl23 at gmail dot com
2012-04-03 13:07 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52580-4-mjBzMMZpV2@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).