From patchwork Mon Nov 15 00:01:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 47642 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 405A93857C44 for ; Mon, 15 Nov 2021 00:02:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 405A93857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636934561; bh=idWC67ykq5Qc/meJJFrtcCFocmJaN3NNRudub4LPsL0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=HwqMsCg81vys3YplwYHjEHM7Kd3CmcMifuzBoSBMz6APdtvpwuXUYPtcYF8pOThL6 Kk4yRJh/nFcGhk6tdhBCHPrj+JPdPkD0BGgr8k4wqpsOCSPqCGrnHol8O2xuIFt540 mEd6IIYy7XbREzARhCGX7B6iYsvsPJOA7/BdjzGM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id 316323858D39 for ; Mon, 15 Nov 2021 00:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 316323858D39 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AEMW9cC000563 for ; Sun, 14 Nov 2021 16:02:08 -0800 Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cb9yq8def-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 14 Nov 2021 16:02:08 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 14 Nov 2021 16:02:06 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Sun, 14 Nov 2021 16:02:06 -0800 Received: from linux.wrightpinski.org.com (unknown [10.69.242.198]) by maili.marvell.com (Postfix) with ESMTP id D6AB73F70E7; Sun, 14 Nov 2021 16:01:40 -0800 (PST) To: Subject: [PATCH] [Commmitted] Move some testcases to torture from tree-ssa Date: Sun, 14 Nov 2021 16:01:36 -0800 Message-ID: <1636934496-26546-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: FHvAuOuUiG5prpxPbF98JKBgTkHIlV2m X-Proofpoint-GUID: FHvAuOuUiG5prpxPbF98JKBgTkHIlV2m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-14_10,2021-11-12_01,2020-04-07_01 X-Spam-Status: No, score=-14.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: apinski--- via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: apinski@marvell.com Cc: Andrew Pinski Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Andrew Pinski 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; -} -