public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kewen Lin <linkw@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r10-10925] rs6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345]
Date: Tue,  2 Aug 2022 03:53:46 +0000 (GMT)	[thread overview]
Message-ID: <20220802035346.04CF23851AB0@sourceware.org> (raw)

https://gcc.gnu.org/g:a221c4b8e581d89c311f58c7c2e64c9d1f16c642

commit r10-10925-ga221c4b8e581d89c311f58c7c2e64c9d1f16c642
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Mon Jul 25 00:51:44 2022 -0500

    rs6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345]
    
    As PR106345 shows, when configuring compiler with an explicit
    option --with-tune=<value>, it would cause some test cases to
    fail if their test points are sensitive to tune setting, such
    as: group_ending_nop, loop align etc.  It doesn't help that
    even to specify one explicit -mcpu=.
    
    This patch is to adjust the behavior of -mdejagnu-cpu by
    filtering out all -mcpu= and -mtune= options, then test cases
    would use <cpu> as tune as the one specified by -mdejagnu-cpu.
    
    2022-07-25  Peter Bergner  <bergner@linux.ibm.com>
                Kewen Lin  <linkw@linux.ibm.com>
    
            PR testsuite/106345
    
    gcc/ChangeLog:
    
            * config/rs6000/rs6000.h (DRIVER_SELF_SPECS): Adjust -mdejagnu-cpu
            to filter out all -mtune options.
    
    (cherry picked from commit 75d20d6c84c12bedd65a904e462f02f0b9eb3f77)

Diff:
---
 gcc/config/rs6000/rs6000.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index efd989c5d29..bb297a0a14d 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -81,12 +81,15 @@
 # define SUBTARGET_DRIVER_SELF_SPECS ""
 #endif
 
-/* Only for use in the testsuite: -mdejagnu-cpu= simply overrides -mcpu=.
+/* Only for use in the testsuite: -mdejagnu-cpu=<value> filters out all
+   -mcpu= as well as -mtune= options then simply adds -mcpu=<value>,
+   while -mdejagnu-tune=<value> filters out all -mtune= options then
+   simply adds -mtune=<value>.
    With older versions of Dejagnu the command line arguments you set in
-   RUNTESTFLAGS override those set in the testcases; with this option,
-   the testcase will always win.  Ditto for -mdejagnu-tune=.  */
+   RUNTESTFLAGS override those set in the testcases; with these options,
+   the testcase will always win.  */
 #define DRIVER_SELF_SPECS \
-  "%{mdejagnu-cpu=*: %<mcpu=* -mcpu=%*}", \
+  "%{mdejagnu-cpu=*: %<mcpu=* %<mtune=* -mcpu=%*}", \
   "%{mdejagnu-tune=*: %<mtune=* -mtune=%*}", \
   "%{mdejagnu-*: %<mdejagnu-*}", \
    SUBTARGET_DRIVER_SELF_SPECS


                 reply	other threads:[~2022-08-02  3:53 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=20220802035346.04CF23851AB0@sourceware.org \
    --to=linkw@gcc.gnu.org \
    --cc=gcc-cvs@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).