gfortran.dg/vect failures at -m64 on darwin

Dorit Nuzman DORIT@il.ibm.com
Fri Aug 3 19:32:00 GMT 2007


> >     I am seeing a set of gfortran.dg/vect failures at -m64
> > on power-apple-darwin with current gcc trunk that I don't
> > see with gcc 4.2.1.
>
> I see the same failures with gcc trunk. I have had a quick look at
vect-4.f90
> and I get:
>

I wonder if this is a result of this patch:

      2007-07-12  Dorit Nuzman  <dorit@il.ibm.com>
                  Devang Patel  <dpatel@apple.com>
        PR tree-optimization/25413
        ...
        * config/rs6000/rs6000.c (rs6000_vector_alignment_reachable): New.
        (TARGET_VECTOR_ALIGNMENT_REACHABLE): Define.

...which doesn't allow to perform loop-peeling on darwin?

Do you see the following in the dump file (when compiled with
-fdump-tree-vect-details):
"vector alignment may not be reachable"
and
"Alignment of access forced using versioning."?

If you don't, please send me the dump file (when compiled with
-fdump-tree-vect-details).

If you do, I think we'll have to xfail these checks on
"{vect_no_align || !vector_alignment_reachable}" (instead of only
"vect_no_align").
However, AFAIK our testsuite engine does not support a combination of
operators (i.e., '||' and '!'), so either we need to introduce a new target
keyword in target-supports.exp to represent the above expression,
or extend the testsuite engine to support this (I have no idea what this
involves),
or list the specific targets for which each check is to pass/xfail (not
crazy about this option).

(another option is to just drop these checks... I think the point was to
check if the testcase is vectorized, and we took the opportunity to also
make sure it's vectorized the way we expect it to (with respect to
alignment handling). But if it's becoming too annoying to maintain these
alignment checks we could consider dropping them (although I think there is
value in keeping track of that, though maybe not necessarily in so many
testcases).

dorit

> [karma] f90/bug% gfc -c -m64 -fdump-tree-vect-stats -ftree-vectorize
> -ftree-vectorizer-verbose=4 -O2 /opt/gcc/gcc-4.3-
> work/gcc/testsuite/gfortran.dg/vect/vect-4.f90
> ...
> ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
> ! { dg-final { scan-tree-dump-times "Alignment of access forced
> using peeling" 1 "vect" { xfail vect_no_align } } }
> ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned
> access" 1 "vect" { xfail vect_no_align } } }
> ! { dg-final { scan-tree-dump-times "accesses have the same
> alignment." 1 "vect" } }
> ! { dg-final { cleanup-tree-dump "vect" } }
> [karma] f90/bug% grep "vectorized 1 loops" vect-4.f90.102t.vect
> /opt/gcc/gcc-4.3-work/gcc/testsuite/gfortran.dg/vect/vect-4.f90:7:
> note: vectorized 1 loops in function.
> [karma] f90/bug% grep "Alignment of access forced using peeling"
> vect-4.f90.102t.vect
> [karma] f90/bug% grep "Vectorizing an unaligned access"
vect-4.f90.102t.vect
> /opt/gcc/gcc-4.3-work/gcc/testsuite/gfortran.dg/vect/vect-4.f90:9:
> note: Vectorizing an unaligned access.
> /opt/gcc/gcc-4.3-work/gcc/testsuite/gfortran.dg/vect/vect-4.f90:9:
> note: Vectorizing an unaligned access.
> [karma] f90/bug% grep "accesses have the same alignment."
vect-4.f90.102t.vect
> /opt/gcc/gcc-4.3-work/gcc/testsuite/gfortran.dg/vect/vect-4.f90:9:
> note: accesses have the same alignment.
>
> As far as I understand the test 'scan-tree-dump-times "Vectorizing
> an unaligned access"'
> is probably finding a 2 instead of 1. In addition I don't know what
> 'vect_no_align'
> is supposed to be on Darwin and same about "peeling".
>
> Dominique



More information about the Fortran mailing list