Re: Repeat main vect.exp tests with -flto

2011-04-18 Thread Rainer Orth
Richard,

 +foreach flags { -flto} {
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
 + $flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
 + $flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
 +$flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
 +$flags $VECT_SLP_CFLAGS
 +}

I think you need to make sure that the target supports lto,
cf. check_effective_target_lto.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: Repeat main vect.exp tests with -flto

2011-04-18 Thread Richard Sandiford
Rainer Orth r...@cebitec.uni-bielefeld.de writes:
 +foreach flags { -flto} {
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
 +$flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
 +$flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
 +$flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
 +$flags $VECT_SLP_CFLAGS
 +}

 I think you need to make sure that the target supports lto,
 cf. check_effective_target_lto.

Good point.  How's this?  Tested as before.

Richard


gcc/testsuite/
* gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto
and once without.

Index: gcc/testsuite/gcc.dg/vect/vect.exp
===
--- gcc/testsuite/gcc.dg/vect/vect.exp  2011-04-18 08:47:17.0 +0100
+++ gcc/testsuite/gcc.dg/vect/vect.exp  2011-04-18 14:51:40.0 +0100
@@ -75,15 +75,20 @@ lappend DEFAULT_VECTCFLAGS -fdump-tree-
 lappend VECT_SLP_CFLAGS -fdump-tree-slp-details
 
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
-$DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
-$DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
- $DEFAULT_VECTCFLAGS
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
- $VECT_SLP_CFLAGS
-
+set VECT_ADDITIONAL_FLAGS [list ]
+if { [check_effective_target_lto] } {
+lappend VECT_ADDITIONAL_FLAGS -flto
+}
+foreach flags $VECT_ADDITIONAL_FLAGS {
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
+   $flags $DEFAULT_VECTCFLAGS
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
+   $flags $DEFAULT_VECTCFLAGS
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
+$flags $DEFAULT_VECTCFLAGS
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
+$flags $VECT_SLP_CFLAGS
+}
 
  Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS


Re: Repeat main vect.exp tests with -flto

2011-04-18 Thread Rainer Orth
Richard,

 I think you need to make sure that the target supports lto,
 cf. check_effective_target_lto.

 Good point.  How's this?  Tested as before.

looks good, thanks.

Rainer



 Richard


 gcc/testsuite/
   * gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto
   and once without.

 Index: gcc/testsuite/gcc.dg/vect/vect.exp
 ===
 --- gcc/testsuite/gcc.dg/vect/vect.exp2011-04-18 08:47:17.0 
 +0100
 +++ gcc/testsuite/gcc.dg/vect/vect.exp2011-04-18 14:51:40.0 
 +0100
 @@ -75,15 +75,20 @@ lappend DEFAULT_VECTCFLAGS -fdump-tree-
  lappend VECT_SLP_CFLAGS -fdump-tree-slp-details
  
  # Main loop.
 -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
 -  $DEFAULT_VECTCFLAGS
 -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
 -  $DEFAULT_VECTCFLAGS
 -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
 - $DEFAULT_VECTCFLAGS
 -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
 - $VECT_SLP_CFLAGS
 -
 +set VECT_ADDITIONAL_FLAGS [list ]
 +if { [check_effective_target_lto] } {
 +lappend VECT_ADDITIONAL_FLAGS -flto
 +}
 +foreach flags $VECT_ADDITIONAL_FLAGS {
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
 + $flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]]  \
 + $flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]]  \
 +$flags $DEFAULT_VECTCFLAGS
 +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]]  \
 +$flags $VECT_SLP_CFLAGS
 +}
  
   Tests with special options
  global SAVED_DEFAULT_VECTCFLAGS

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University