Message ID | 20240216175217.1024117-1-dimitar@dinux.eu |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> 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 2B8653857B8E for <patchwork@sourceware.org>; Fri, 16 Feb 2024 17:53:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 2BD05385803B for <gcc-patches@gcc.gnu.org>; Fri, 16 Feb 2024 17:52:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BD05385803B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2BD05385803B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.174.156.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708105961; cv=none; b=DktA5JC8pHCjkEY7v8+FJxsR9caf3ZEpL7RLqOUR+l2WppB7NnZR0wdNstfp6P99w+Jg0YVKk5tbiK6+P9XAP0xhs7EAaEdRI3gycO5K4XC3bXCToXx9f+O3RJy1M6cc/VNntAFhx03uyDlUXQSZJl2kbHKV0IySsoFWRqc7HDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708105961; c=relaxed/simple; bh=WqlEfHLMrUvg6/Ln3/4lFmHObdkUhmfNuEugNm8nhiU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=l7SgXpl9eBdmPUZ0iAz3Qpojs5yeJoPCRJWww1HYMOiMiWdRykSF+3vrrs8beNJcvrV99x13TxKdePFg7kMBbJEYCn619Wki5/a0UXkVd9TBhswvNiLNPXEvQzyrpGkNXZWO5Yh9SAD3vPEP6B/L8MiK8JD2QHzcRSvmjjgRC78= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=NPuzumcmIfri1JdpMhAmZmUx0VY/JaTls9sL/nXmZas=; b=gIcL24ZyWMPkkcsoPXUA9HAWVE xUrI36WwqsxyGfyO9gznDgKf2LpOX0n3srQe6qzboR7uDvGqZIsgOnC+MOAF75typWgZVcxFSNEX9 9d9RTV9B/4UgaUxQGouXv34t2QiF6Vq/ScaDOAmmYzSl0SOxH4gW3hmZTD7s7IHTsjsucN4sF84Yn WUUa6zUb57NUEVM6PI/Gw1wIWPfB2hCttZsG6zMES4pF+Bwvbe5MduQs2hbFTrjRf1rgd++v717Qe 6ONL9ZYo3/FyzRcNvAleX3Fy7RAiuZCtzG7OFP9VMylcXWBM9lwdFH8MaXZERxY8M+/oHXQMWJ36x O14SWZ9Q==; Received: from [95.42.20.142] (port=42722 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from <dimitar@dinux.eu>) id 1rb2O1-0005GE-0G; Fri, 16 Feb 2024 19:52:35 +0200 From: Dimitar Dimitrov <dimitar@dinux.eu> To: gcc-patches@gcc.gnu.org Cc: Dimitar Dimitrov <dimitar@dinux.eu> Subject: [PATCH] testsuite: Disable slow and unneeded test variants Date: Fri, 16 Feb 2024 19:52:17 +0200 Message-ID: <20240216175217.1024117-1-dimitar@dinux.eu> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, LIKELY_SPAM_BODY, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org |
Series |
testsuite: Disable slow and unneeded test variants
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 | success | Testing passed |
Commit Message
Dimitar Dimitrov
Feb. 16, 2024, 5:52 p.m. UTC
The issue in PR112344 is triggered only at -O2, so there is little value
in running the test at lower optimization levels. At the same time the
generated code at low and code-size optimization levels is taking a long
time to execute because it loops a few billion iterations.
On the PRU simulator target the non-optimized test variants take more
than 10 minutes, thus failing due to timeout. Even a native x86_64
takes a few seconds to run the non-optimized variants.
Let's not waste cycles and run only the test configurations which
triggered the issue described in the PR.
On native x86_64 Linux:
$ time make check-gcc-c -j10 RUNTESTFLAGS="dg-torture.exp=pr112344.c"
------------------------------------------
Time Previously With this patch
------------------------------------------
real 0m4,786s 0m1,694s
user 0m7,031s 0m4,013s
sys 0m3,300s 0m3,234s
With PRU simulator:
$ time make -j10 check-gcc-c RUNTESTFLAGS="--target_board=pru-sim dg-torture.exp=pr112344.c"
------------------------------------------
Time Previously With this patch
------------------------------------------
real 11m32,740s 0m1,897s
user 11m34,301s 0m4,012s
sys 0m2,178s 0m2,133s
Ok for trunk?
PR middle-end/112344
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr112344.c: Run only
for expensive speed optimizations.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
gcc/testsuite/gcc.dg/torture/pr112344.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Fri, Feb 16, 2024 at 07:52:17PM +0200, Dimitar Dimitrov wrote: > The issue in PR112344 is triggered only at -O2, so there is little value > in running the test at lower optimization levels. At the same time the That is generally not true. We had hundreds of cases in the history where a test written for one bug let us discover a different bug later on, often at different optimization level etc. If the test is too slow, perhaps the dg-skip-if should take the run_expensive_tests effective target into account, like: /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O1" } } */ But guess another question is if the bug can be reproduced with fewer iterations... Jakub
On Fri, Feb 16, 2024 at 07:06:57PM +0100, Jakub Jelinek wrote: > On Fri, Feb 16, 2024 at 07:52:17PM +0200, Dimitar Dimitrov wrote: > > The issue in PR112344 is triggered only at -O2, so there is little value > > in running the test at lower optimization levels. At the same time the > > That is generally not true. > We had hundreds of cases in the history where a test written for one bug > let us discover a different bug later on, often at different optimization > level etc. > > If the test is too slow, perhaps the dg-skip-if should take the > run_expensive_tests effective target into account, like: > /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O1" } } */ Thank you, this is reasonable. I'll send V2 with that change. Curiously, -Os also needs to be added to the slow variants, along with -O0 and -O1. > > But guess another question is if the bug can be reproduced with fewer > iterations... I could not think of a way to do it. Regards, Dimitar > > Jakub >
On Sat, Feb 17, 2024 at 09:59:12PM +0200, Dimitar Dimitrov wrote: > On Fri, Feb 16, 2024 at 07:06:57PM +0100, Jakub Jelinek wrote: > > On Fri, Feb 16, 2024 at 07:52:17PM +0200, Dimitar Dimitrov wrote: > > > The issue in PR112344 is triggered only at -O2, so there is little value > > > in running the test at lower optimization levels. At the same time the > > > > That is generally not true. > > We had hundreds of cases in the history where a test written for one bug > > let us discover a different bug later on, often at different optimization > > level etc. > > > > If the test is too slow, perhaps the dg-skip-if should take the > > run_expensive_tests effective target into account, like: > > /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O1" } } */ > > Thank you, this is reasonable. I'll send V2 with that change. > > Curiously, -Os also needs to be added to the slow variants, along with > -O0 and -O1. Ok then. > > But guess another question is if the bug can be reproduced with fewer > > iterations... > > I could not think of a way to do it. Yeah, I haven't managed to reduce the number of iterations and still trigger the bug. Jakub
diff --git a/gcc/testsuite/gcc.dg/torture/pr112344.c b/gcc/testsuite/gcc.dg/torture/pr112344.c index c52d2c8304b..abcef51428f 100644 --- a/gcc/testsuite/gcc.dg/torture/pr112344.c +++ b/gcc/testsuite/gcc.dg/torture/pr112344.c @@ -1,6 +1,8 @@ /* { dg-do run } */ /* { dg-require-effective-target int32plus } */ +/* { dg-skip-if "triggered by expensive speed optimizations" { *-*-* } { "-O0" "-O1" "-Os" "-Oz" } { "" } } */ + int main () {