From: <apinski@marvell.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Andrew Pinski <apinski@marvell.com>
Subject: [PATCH] [Commmitted] Move some testcases to torture from tree-ssa
Date: Sun, 14 Nov 2021 16:01:36 -0800 [thread overview]
Message-ID: <1636934496-26546-1-git-send-email-apinski@marvell.com> (raw)
From: Andrew Pinski <apinski@marvell.com>
While writing up some testcases, I noticed some newer testcases
just had "dg-do compile/run" on them with dg-options of either -O1
or -O2. Since it is always better to run them over all optimization
levels I put them in gcc.c-torture/compile or gcc.c-torture/execute.
Committed after testing to make sure the testcases pass.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr100278.c: Move to ...
* gcc.c-torture/compile/pr100278.c: Here.
Remove dg-do and dg-options.
* gcc.dg/tree-ssa/pr101189.c: Move to ...
* gcc.c-torture/compile/pr101189.c: Here.
Remove dg-do and dg-options.
* gcc.dg/tree-ssa/pr100453.c: Move to ...
* gcc.c-torture/execute/pr100453.c: Here.
Remove dg-do and dg-options.
* gcc.dg/tree-ssa/pr101335.c: Move to ...
* gcc.c-torture/execute/pr101335.c: Here
Remove dg-do and dg-options.
---
gcc/testsuite/gcc.c-torture/compile/pr100278.c | 15 +++++++++++++++
gcc/testsuite/gcc.c-torture/compile/pr101189.c | 15 +++++++++++++++
gcc/testsuite/gcc.c-torture/execute/pr100453.c | 16 ++++++++++++++++
gcc/testsuite/gcc.c-torture/execute/pr101335.c | 15 +++++++++++++++
gcc/testsuite/gcc.dg/tree-ssa/pr100278.c | 17 -----------------
gcc/testsuite/gcc.dg/tree-ssa/pr100453.c | 18 ------------------
gcc/testsuite/gcc.dg/tree-ssa/pr101189.c | 17 -----------------
gcc/testsuite/gcc.dg/tree-ssa/pr101335.c | 17 -----------------
8 files changed, 61 insertions(+), 69 deletions(-)
create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr100278.c
create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr101189.c
create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr100453.c
create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr101335.c
delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100278.c b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
new file mode 100644
index 0000000..4631080
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
@@ -0,0 +1,15 @@
+
+void a()
+{
+#if defined __s390__
+ register int b asm("r5");
+#elif defined __x86_64__
+ register int b asm("eax");
+#else
+ volatile int b;
+#endif
+ if (b)
+ b = 1;
+ for (; b;)
+ ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr101189.c b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
new file mode 100644
index 0000000..ad83d32
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/101189 */
+
+static int a, b;
+int main() {
+ int d = 0, e, f = 5;
+ if (a)
+ f = 0;
+ for (; f < 4; f++)
+ ;
+ e = f ^ -f;
+ e && d;
+ if (!e)
+ e || b;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr100453.c b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
new file mode 100644
index 0000000..853a892
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
@@ -0,0 +1,16 @@
+
+struct a {
+ int b : 4;
+} d;
+static int c, e;
+static const struct a f;
+static void g(const struct a h) {
+ for (; c < 1; c++)
+ d = h;
+ e = h.b;
+ c = h.b;
+}
+int main() {
+ g(f);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr101335.c b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
new file mode 100644
index 0000000..45a399f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
@@ -0,0 +1,15 @@
+
+unsigned a = 0xFFFFFFFF;
+int b;
+int main()
+{
+ int c = ~a;
+ unsigned d = c - 10;
+ if (d > c)
+ c = 20;
+ b = -(c | 0);
+ if (b > -8)
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
deleted file mode 100644
index 8d70228..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-void a()
-{
-#if defined __s390__
- register int b asm("r5");
-#elif defined __x86_64__
- register int b asm("eax");
-#else
- volatile int b;
-#endif
- if (b)
- b = 1;
- for (; b;)
- ;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
deleted file mode 100644
index 0cf0ad2..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O1" } */
-
-struct a {
- int b : 4;
-} d;
-static int c, e;
-static const struct a f;
-static void g(const struct a h) {
- for (; c < 1; c++)
- d = h;
- e = h.b;
- c = h.b;
-}
-int main() {
- g(f);
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
deleted file mode 100644
index 5730708..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* PR tree-optimization/101189 */
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-static int a, b;
-int main() {
- int d = 0, e, f = 5;
- if (a)
- f = 0;
- for (; f < 4; f++)
- ;
- e = f ^ -f;
- e && d;
- if (!e)
- e || b;
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
deleted file mode 100644
index 921362c..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O2" } */
-
-unsigned a = 0xFFFFFFFF;
-int b;
-int main()
-{
- int c = ~a;
- unsigned d = c - 10;
- if (d > c)
- c = 20;
- b = -(c | 0);
- if (b > -8)
- __builtin_abort ();
- return 0;
-}
-
--
1.8.3.1
reply other threads:[~2021-11-15 0:02 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=1636934496-26546-1-git-send-email-apinski@marvell.com \
--to=apinski@marvell.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).