public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/39300]  New: vectorizer confused by predictive commoning
@ 2009-02-25 12:16 matz at gcc dot gnu dot org
  2009-02-25 13:53 ` [Bug tree-optimization/39300] " matz at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: matz at gcc dot gnu dot org @ 2009-02-25 12:16 UTC (permalink / raw)
  To: gcc-bugs

The loop in this test is not vectorized if either PRE or predictive
commoning is active:
% cat vecttest2.f
      subroutine Bench_StaggeredLeapfrog2( cctk_dim,XADM_curv_stag0,
     &ADM_kzz_stag,lgxx,nx)
      implicit none
      INTEGER cctk_dim
      INTEGER XADM_curv_stag0
      REAL*8 ADM_kzz_stag(XADM_curv_stag0)

      integer :: i
      integer :: nx
      REAL*8,DIMENSION(cctk_dim):: lgxx
      do i=2,nx-1
        ADM_kzz_stag(i) = ADM_kzz_stag(i)+lgxx(i)+lgxx(i-1)+lgxx(i+1)
      end do
      end subroutine Bench_StaggeredLeapfrog2
% gfortran -c -O3 -g -ffast-math -ftree-vectorizer-verbose=2 vecttest2.f
vecttest2.f:11: note: not vectorized: unsupported use in stmt.
vecttest2.f:12: note: not vectorized: unsupported use in stmt.
% add -fno-tree-pre -fno-predictive-commoning to above command:
vecttest2.f:11: note: LOOP VECTORIZED.
% add only -fno-tree-pre (so predictive commoning is active):
vecttest2.f:11: note: LOOP VECTORIZED.
vecttest2.f:12: note: not vectorized: unsupported use in stmt.

The one vectorized loop in case it mentions two of them is the tail loop
for the one produced by predictive commoning.  That one doesn't contain
any loop carried values.  Somehow the vectorizer doesn't like the 
PHI nodes in the loop created by predictive commoning.

This testcase comes from 436.cactusADM, where it's very important to
vectorize a certain inner loop, and this (PRE and predcom) is one reason this
doesn't happen already.


-- 
           Summary: vectorizer confused by predictive commoning
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matz at gcc dot gnu dot org
  GCC host triplet: x86_64-linux


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


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-39300-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-07-19 11:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-25 12:16 [Bug tree-optimization/39300] New: vectorizer confused by predictive commoning matz at gcc dot gnu dot org
2009-02-25 13:53 ` [Bug tree-optimization/39300] " matz at gcc dot gnu dot org
2009-02-25 13:56 ` rguenth at gcc dot gnu dot org
2009-02-25 14:07 ` [Bug tree-optimization/39300] vectorizer confused by predictive commoning and PRE rguenth at gcc dot gnu dot org
2009-02-25 14:08 ` irar at il dot ibm dot com
2009-03-08 14:26 ` dorit at gcc dot gnu dot org
2009-03-09 13:25 ` matz at gcc dot gnu dot org
2009-07-22 15:31 ` matz at gcc dot gnu dot org
2009-07-22 15:40 ` matz at gcc dot gnu dot org
2009-08-17 17:39 ` jessiecute13 at aol dot com
     [not found] <bug-39300-4@http.gcc.gnu.org/bugzilla/>
2012-07-13  8:51 ` rguenth at gcc dot gnu.org
2012-07-19 11:42 ` rguenth at gcc dot gnu.org

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).