diff mbox

Repeat main vect.exp tests with -flto

Message ID g439lfagpr.fsf@linaro.org
State New
Headers show

Commit Message

Richard Sandiford April 18, 2011, 12:26 p.m. UTC
This patchs makes us run the main C vect.exp tests twice, once with the
normal optimisation options and once with -flto added.  It's a simple
way of covering the LTO streaming of the new "internal" functions,
but it should be useful more generally.

The testsuite runs quickly (even cross), so an extra pass through
doesn't have much overhead.

Tested on x86_64-linux-gnu and arm-linux-gnueabi.  OK to install?

Richard


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

Comments

Rainer Orth April 18, 2011, 12:53 p.m. UTC | #1
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
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/vect/vect.exp
===================================================================
--- gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 08:47:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/vect/vect.exp	2011-04-18 13:22:53.000000000 +0100
@@ -75,15 +75,16 @@  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
-
+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
+}
 
 #### Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS