From: Diego Novillo <dnovillo@google.com>
To: gcc-patches@gcc.gnu.org
Subject: [lto] Fix botched -flto flags in testsuite
Date: Thu, 16 Oct 2008 15:09:00 -0000 [thread overview]
Message-ID: <20081016135847.GA25747@legolas> (raw)
Thanks to Rafael for noticing this. When I added -flto to the
testsuite I didn't look close enough at the new failures.
Some of them were failing for the obvious reason that the flags
were being passed incorrectly. This patch fixes that.
Tested on x86_64. This time I did check for the obvious.
Diego.
* gcc.dg/debug/debug.exp: Fix -flto options
* gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp: Likewise.
* gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp: Likewise.
* gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: Likewise.
* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Likewise.
* gcc.dg/vect/vect.exp: Likewise.
* gcc.misc-tests/dectest.exp: Likewise.
* g++.dg/debug/debug.exp: Likewise.
* g++.dg/vect/vect.exp: Likewise.
Index: testsuite/gcc.dg/debug/debug.exp
===================================================================
--- testsuite/gcc.dg/debug/debug.exp (revision 141168)
+++ testsuite/gcc.dg/debug/debug.exp (working copy)
@@ -24,7 +24,7 @@ dg-init
# Main loop.
-gcc-dg-debug-runtest gcc_target_compile trivial.c [list "-O -flto" "-O3 -flto"] \
+gcc-dg-debug-runtest gcc_target_compile trivial.c [list -O -O3 -flto] \
[lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]]
# All done.
Index: testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp
===================================================================
--- testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp (revision 141168)
+++ testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp (working copy)
@@ -33,7 +33,7 @@ if ![is-effective-target powerpc_altivec
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
Index: testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp
===================================================================
--- testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp (revision 141168)
+++ testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp (working copy)
@@ -29,7 +29,7 @@ if { ![istarget spu*-*-*] } then {
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
Index: testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
===================================================================
--- testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp (revision 141168)
+++ testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp (working copy)
@@ -28,7 +28,7 @@ if { ![istarget i?86*-*-*] && ![istarget
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
Index: testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
===================================================================
--- testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp (revision 141168)
+++ testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp (working copy)
@@ -29,7 +29,7 @@ if { (![istarget x86_64-*-*] && ![istarg
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
Index: testsuite/gcc.dg/vect/vect.exp
===================================================================
--- testsuite/gcc.dg/vect/vect.exp (revision 141168)
+++ testsuite/gcc.dg/vect/vect.exp (working copy)
@@ -111,10 +111,12 @@ dg-init
global O1_VECTCFLAGS
set O1_VECTCFLAGS $DEFAULT_VECTCFLAGS
-lappend O1_VECTCFLAGS "-O1 -flto"
+lappend O1_VECTCFLAGS "-O1"
+lappend O1_VECTCFLAGS "-flto"
lappend O1_VECTCFLAGS "-fdump-tree-vect-details"
-lappend DEFAULT_VECTCFLAGS "-O2 -flto"
+lappend DEFAULT_VECTCFLAGS "-O2"
+lappend DEFAULT_VECTCFLAGS "-flto"
# Tests that should be run without generating dump info
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]] \
@@ -238,13 +240,15 @@ dg-runtest [lsort [glob -nocomplain $src
# With -Os
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
-lappend DEFAULT_VECTCFLAGS "-Os -flto"
+lappend DEFAULT_VECTCFLAGS "-Os"
+lappend DEFAULT_VECTCFLAGS "-flto"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
# With -O3
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
-lappend DEFAULT_VECTCFLAGS "-O3 -flto"
+lappend DEFAULT_VECTCFLAGS "-O3"
+lappend DEFAULT_VECTCFLAGS "-flto"
if [istarget "spu-*-*"] {
lappend DEFAULT_VECTCFLAGS "-funroll-loops"
}
Index: testsuite/gcc.misc-tests/dectest.exp
===================================================================
--- testsuite/gcc.misc-tests/dectest.exp (revision 141168)
+++ testsuite/gcc.misc-tests/dectest.exp (working copy)
@@ -20,7 +20,7 @@
#
# Contributed by Ben Elliston <bje@au.ibm.com>.
-set DEC_TORTURE_OPTIONS [list {} -O1 "-O2 -flto" -O3 -Os -msoft-float]
+set DEC_TORTURE_OPTIONS [list {} -O1 {-O2 -flto} -O3 -Os -msoft-float]
proc target-specific-flags {} {
set result "-frounding-math "
Index: testsuite/g++.dg/debug/debug.exp
===================================================================
--- testsuite/g++.dg/debug/debug.exp (revision 141168)
+++ testsuite/g++.dg/debug/debug.exp (working copy)
@@ -23,7 +23,7 @@ load_lib g++-dg.exp
dg-init
# Main loop.
-gcc-dg-debug-runtest g++_target_compile trivial.C [list "-O2 -flto" "-O3 -flto"] \
+gcc-dg-debug-runtest g++_target_compile trivial.C [list -O2 -O3 -flto] \
[lsort [glob -nocomplain $srcdir/$subdir/*.C]]
# All done.
Index: testsuite/g++.dg/vect/vect.exp
===================================================================
--- testsuite/g++.dg/vect/vect.exp (revision 141168)
+++ testsuite/g++.dg/vect/vect.exp (working copy)
@@ -39,8 +39,8 @@ set save-dg-do-what-default ${dg-do-what
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fno-vect-cost-model" \
- "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
+lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" \
+ "-fno-vect-cost-model" "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
# Skip these tests for targets that do not support generating vector
# code. Set additional target-dependent vector flags, which can be
reply other threads:[~2008-10-16 13:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081016135847.GA25747@legolas \
--to=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).