public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-1008] Fix two testcases for ssa names which are more than 1 digit
Date: Mon, 24 May 2021 01:13:45 +0000 (GMT)	[thread overview]
Message-ID: <20210524011345.B3522385800F@sourceware.org> (raw)

https://gcc.gnu.org/g:1040a44aa23f7b106e1c96e6a247ea6fd4021258

commit r12-1008-g1040a44aa23f7b106e1c96e6a247ea6fd4021258
Author: Andrew Pinski <apinski@marvell.com>
Date:   Sun May 23 17:35:40 2021 +0000

    Fix two testcases for ssa names which are more than 1 digit
    
    phi-opt-10.c and phi-opt-7.c both depend on currently that some ssa name
    versions are one digit long which is not always correct. This fixes the
    problem by detecting digits rather than just using '.'.
    
    Committed as obvious after a bootstrap/test.
    
    Thanks,
    Andrew Pinski
    
    gcc/testsuite/ChangeLog
            * gcc.dg/tree-ssa/phi-opt-10.c: Use "\[0-9\]*" instead of '.'
            when matching ssa name version.
            * gcc.dg/tree-ssa/phi-opt-7.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c | 2 +-
 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
index 4c190e6af7d..3681fa78836 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
@@ -7,4 +7,4 @@ int eqm1_phi (unsigned long a) { return a ? 0 : -1; }
 int spaceship1 (long a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }
 int spaceship2 (long a) { return a > 0 ? 1 : a == 0 ? 0 : -1; }
 
-/* { dg-final { scan-tree-dump-times " = -\[^\r\n\]*_.;" 4 "optimized"} } */
+/* { dg-final { scan-tree-dump-times " = -\[^\r\n\]*_\[0-9\]*;" 4 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
index 18ecbd52aa2..51e1f6dfa75 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
@@ -18,5 +18,5 @@ int f(int t, int c)
 /* There should be one ifs as one of them should be changed into
    a conditional and the other should be there still.  */
 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" }  }*/
-/* { dg-final { scan-tree-dump-times "\[^\r\n\]*_. = c_\[0-9\]*.D. != 0" 1 "optimized"  } } */
+/* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = c_\[0-9\]*.D. != 0" 1 "optimized"  } } */


                 reply	other threads:[~2021-05-24  1:13 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=20210524011345.B3522385800F@sourceware.org \
    --to=pinskia@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).