This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ping: [patch, testsuite] Fix gfortran.dg/vect/pr36119.f (was "Fix PR tree-optimization/36119 (committed)")


This patch enables gfortran.dg/vect/pr36119.f for all targets and renames
it to O3-pr36119.f90 to avoid usage of -ffree-form.
Checked on x86_64 and ppc-linux. O.K. to commit (4.3.1 and 4.4)?

Thanks,
Ira

gcc-patches-owner@gcc.gnu.org wrote on 05/05/2008 12:28:19:

>
>
> "Andrew Pinski" <pinskia@gmail.com> wrote on 05/05/2008 10:57:36:
>
> > On Mon, May 5, 2008 at 12:51 AM, Ira Rosen <IRAR@il.ibm.com> wrote:
> > >  Index: testsuite/gfortran.dg/vect/pr36119.f
> > >  ===================================================================
> > >  --- testsuite/gfortran.dg/vect/pr36119.f        (revision 0)
> > >  +++ testsuite/gfortran.dg/vect/pr36119.f        (revision 0)
> > >  @@ -0,0 +1,29 @@
> > >  +! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
> > >  +! { dg-options "-O3 -mfpmath=sse -msse2 -ffree-form" }
> >
> > For free form fortran tests, you could have named the testcase ending
> > in .f90 which causes free form by default.
>
> Thanks, I didn't know that.
>
> > Also I would have enabled this test at -O3 in general and enable the
> > extra options "-mfpmath=sse -msse2" for x86.
> > That is:
> > ! { dg-do compile  }
> > ! { dg-options "-O3 -ffree-form" }
> > ! { dg-options "-O3 -mfpmath=sse -msse2 -ffree-form" { target {
> > i?86-*-* x86_64-*-* } } }
>
> I checked and actually -mfpmath=sse is redundant here. So I renamed the
> testcase to O3-pr36119.f90 and removed dg-options at all. So now it is
> compiled for all the targets with -O3 and the appropriate SIMD extension.
> Checked on x86_64 and ppc-linux. O.K. to commit (4.3.1 and 4.4)?
>
> Thanks,
> Ira
>
> >
> >
> > Thanks,
> > Andrew Pinski
>
> Index: testsuite/ChangeLog
> ===================================================================
> --- testsuite/ChangeLog (revision 134944)
> +++ testsuite/ChangeLog (working copy)
> @@ -1,5 +1,11 @@
>  2008-05-05  Ira Rosen  <irar@il.ibm.com>
>
> +       * gfortran.dg/vect/pr36119.f: Rename to ...
> +       * gfortran.dg/vect/O3-pr36119.f90: ... this. Compile for all
> targets
> +       with -O3.
> +
> +2008-05-05  Ira Rosen  <irar@il.ibm.com>:
> +
>         PR tree-optimization/36119
>         * gfortran.dg/vect/pr36119.f: New test.
>
> Index: testsuite/gfortran.dg/vect/vect.exp
> ===================================================================
> --- testsuite/gfortran.dg/vect/vect.exp (revision 134943)
> +++ testsuite/gfortran.dg/vect/vect.exp (working copy)
> @@ -137,6 +137,12 @@ lappend DEFAULT_VECTCFLAGS "--param" "ve
>  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-vfa-*.\[fF
> \]{,90,95,03,08} ]]  \
>          "" $DEFAULT_VECTCFLAGS
>
> +# With -O3
> +set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
> +lappend DEFAULT_VECTCFLAGS "-O3"
> +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[fF
> \]{,90,95,03,08} ]]  \]
> +        "" $DEFAULT_VECTCFLAGS
> +
>  # Clean up.
>  set dg-do-what-default ${save-dg-do-what-default}
>
> Index: testsuite/gfortran.dg/vect/O3-pr36119.f90
> ===================================================================
> --- testsuite/gfortran.dg/vect/O3-pr36119.f90   (revision 0)
> +++ testsuite/gfortran.dg/vect/O3-pr36119.f90   (revision 0)
> @@ -0,0 +1,28 @@
> +! { dg-do compile }
> +!
> +SUBROUTINE check_dnucint_ana (dcore)
> +  IMPLICIT NONE
> +  INTEGER, PARAMETER :: dp=8
> +  REAL(dp), DIMENSION(10, 2), INTENT(IN),&
> +       OPTIONAL                            :: dcore
> +  INTEGER                                  :: i, j
> +  REAL(dp)                                 :: delta, nssss, od, rn,
ssssm,
> &}
> +       ssssp
> +  REAL(dp), DIMENSION(10, 2)               :: corem, corep, ncore
> +  LOGICAL                                  :: check_value
> +
> +  delta = 1.0E-8_dp
> +  od = 0.5_dp/delta
> +  ncore = od * (corep - corem)
> +  nssss = od * (ssssp - ssssm)
> +  IF (PRESENT(dcore)) THEN
> +     DO i = 1, 2
> +        DO j = 1, 10)
> +           IF (.NOT.check_value(ncore(j,i), dcore(j,i), delta, 0.1_dp))
> THEN}
> +           END IF
> +        END DO
> +     END DO
> +  END IF
> +END SUBROUTINE check_dnucint_ana
> +
> +! { dg-final { cleanup-tree-dump "vect" } }
> Index: testsuite/gfortran.dg/vect/pr36119.f}
> ===================================================================
> --- testsuite/gfortran.dg/vect/pr36119.f        (revision 134943)
> +++ testsuite/gfortran.dg/vect/pr36119.f        (working copy)
> @@ -1,29 +0,0 @@
> -! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
> -! { dg-options "-O3 -mfpmath=sse -msse2 -ffree-form" }
> -!
> -SUBROUTINE check_dnucint_ana (dcore)
> -  IMPLICIT NONE
> -  INTEGER, PARAMETER :: dp=8
> -  REAL(dp), DIMENSION(10, 2), INTENT(IN),&
> -       OPTIONAL                            :: dcore
> -  INTEGER                                  :: i, j
> -  REAL(dp)                                 :: delta, nssss, od, rn,
ssssm,
> &}
> -       ssssp
> -  REAL(dp), DIMENSION(10, 2)               :: corem, corep, ncore
> -  LOGICAL                                  :: check_value
> -
> -  delta = 1.0E-8_dp
> -  od = 0.5_dp/delta
> -  ncore = od * (corep - corem)
> -  nssss = od * (ssssp - ssssm)
> -  IF (PRESENT(dcore)) THEN
> -     DO i = 1, 2
> -        DO j = 1, 10)
> -           IF (.NOT.check_value(ncore(j,i), dcore(j,i), delta, 0.1_dp))
> THEN}
> -           END IF
> -        END DO
> -     END DO
> -  END IF
> -END SUBROUTINE check_dnucint_ana
> -
> -! { dg-final { cleanup-tree-dump "vect" } }
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]