Message ID | alpine.DEB.2.20.2401112306560.5892@tpp.orcam.me.uk |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1789771dyi; Thu, 11 Jan 2024 15:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxUsgOISMZwbqrb0U0/ENZJTj6unvx4Q+Gcnh264XBamFOTOswksQUWatgSQml8UGNBe5o X-Received: by 2002:a0c:e092:0:b0:680:c1e3:74e7 with SMTP id l18-20020a0ce092000000b00680c1e374e7mr7169qvk.100.1705016190147; Thu, 11 Jan 2024 15:36:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705016190; cv=pass; d=google.com; s=arc-20160816; b=ijjpxXYbOb6PlIHaybyPgQfn28Xd/FMMfWB7Zy8v+L54CSLlcyy2ARRWv9tMMH7jb6 Zea0dvBa43U+2O+3YRiH7qs0h5SnEXs4depcv/fPmxoj3pIlPUBRyt7MG7eBzNqBpsN1 AXusR0AGJdAZiR3WfQX2xYYjQ/54bt9NPFI/IplZ1zJLKYPOEi2KTMQc02BiPpKPfaU7 6YaS7PQj0mvFUxmoUpQZErLz8LX+Pbl6GHn0PvVgXFim8bM7XkeKod8vm4/wrIy/LkjW 6LZiMunNuHfROZu2eK6l4EbXvQL2ExpcqSqdOvoO5FdUkSuOEydUicJNFYpnPcV7/nj9 0RrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :references:message-id:in-reply-to:subject:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=ZMXkCnAhkPJCv9YXvmIIM54NkFNzesJxROMt8sVg0Nc=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=Vk9bZ+DD77NqwXUe4e+4YUZmAMAxbsbCj1OaAxXxzLNEbDlKPgmrlXcCpv6p04wKdg 0nQq2ICpFlNUDlfAHwMCb7c7x2fkg3D2LFU+Ldm/SfTEUJng7K5gZtjdhk5NHCTrwUnf 6mcEhf5CtsuI10Qs3cojM7sEwpxUEHsUf9dcj+pRtv3pX7JdiSSgC4tEhWRHg4aZGvLP NCQLINdirpsE0McJOpo0i4dRRu0GrnsJ5aTKu21KWD3F6GiOIo+LjoJdYgNAUvNZR1ko LvLUUeC4Rg1UDvaYYiHFCVSEcMRfvlzaksE8yzuHpL8h5yx9BmeUEAcw/ZMeZQlID76i heHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=AOxYAvG2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s14-20020a0cdc0e000000b00680c85d6553si1843518qvk.361.2024.01.11.15.36.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 15:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=AOxYAvG2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D377C3857709 for <ouuuleilei@gmail.com>; Thu, 11 Jan 2024 23:36:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 99A0F3858287 for <gcc-patches@gcc.gnu.org>; Thu, 11 Jan 2024 23:35:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99A0F3858287 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99A0F3858287 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705016143; cv=none; b=GS/Llm9KeM68I7/VVicUnKVLNkapwIhMG7ORfNWlWovuSjA+NTLStmoZs/ushwNEnquVd18T+1ub8pv9QvCAIUWEStvAILlHgv7DAU9HuUCjtQwW7HIHbDSB+lkZf0FANjHK9bMG7O3o2oqgkwAQSp2PjdEMSNLi+ycpJToznLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705016143; c=relaxed/simple; bh=qxOtmb+CQ9ZXOH3pnGV7w26pRS3907MPBTf6PC4QBy8=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=sKDqdVtxuMLLlPQH1+kWDKzIuoxngyHYwouxEOXs8Idp2oPCDZnAn2S8lo6F1RubyJjYeqrDEFKyvlXDgEZE7J+o5l8Hf7FYQ8BBs/ripZ1N+uUo8WmSqPsp34H7ap5Fh849JIW90jJvJw0/wlGFLtjxOwiW1xSAuGEoj6f+7lU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a28cc85e6b5so702051866b.1 for <gcc-patches@gcc.gnu.org>; Thu, 11 Jan 2024 15:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1705016140; x=1705620940; darn=gcc.gnu.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZMXkCnAhkPJCv9YXvmIIM54NkFNzesJxROMt8sVg0Nc=; b=AOxYAvG2/Sv3ojBM5EOuCEoNWzrfgdXOY7NHZbdVx+XdNw5i3cCKcrbXgVnC0szSXz tDeRs4S8/9wTuLhZzUsqEyMzbRCoqrHo8QRLN4MzbNMkOrFQzRF2qNnv9i8C5zj4lzZF bjAmUZ3vCjq+4AJDiL3JZ9s+KdA5LLfYvADXvg6R6rkTa1AphQ2RAbGYTIGPoMc339Gy VACpv+Bp7pN+5KQgcby09PuXjW/OrDCx9mS5dxipyBi0dYtBM1KN1S4xFvUCJHAG5667 5qPoP2CfgopHb2PTDcpzYqqSdjbN1okgzdafZl4X1APdJm02hGHeGLm8NhX1TIPK3eFw A6Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705016140; x=1705620940; h=mime-version:user-agent:references:message-id:in-reply-to:subject :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZMXkCnAhkPJCv9YXvmIIM54NkFNzesJxROMt8sVg0Nc=; b=c49RnZabADTefovPhzNX7SklPx3IlSUouHN15/2ItOsaC4WPFbUAwJNSpBwCp6GEPz 22gR+P7P/zrU7wipgvu/po6C6CWMW2D0ljgjqws/VzsHwGFEbZW8jLXcWdM//jY5p0HW rgVRVtfYZCUTIoxgM/1P0puR+BOEf6hyAbPWtrVwTkbr8hSVy65WHZdsHcWT6CCkQAUN NuWgttbhpt7znUD7uPcMjAq8xBZD1bI2uRqOt/Yr8w0mH9oT2U7EN3u3R3FTo58hZ1h8 1DuS7sR6c9vy2GJXFYEC4It/y6n4RT+gH3v+1NbFCvOifdzYDugezVCURVY82dFNu9h6 MBMA== X-Gm-Message-State: AOJu0YwoFBRrgHt3LeLP6SnzWN6JNLU24EwXS6LW5lQXYUrzjx3x+BC8 QZwiAkzdJ+1dhfMCY9NxGlzvS9K0RNJx+BaXmNO0gWHBpQ8= X-Received: by 2002:a17:906:1782:b0:a28:e627:73a5 with SMTP id t2-20020a170906178200b00a28e62773a5mr124981eje.21.1705016139904; Thu, 11 Jan 2024 15:35:39 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id i18-20020a170906091200b00a2c2b475a0esm1099351ejd.105.2024.01.11.15.35.39 for <gcc-patches@gcc.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2024 15:35:39 -0800 (PST) Date: Thu, 11 Jan 2024 23:35:37 +0000 (GMT) From: "Maciej W. Rozycki" <macro@embecosm.com> To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] RISC-V/testsuite: Widen coverage for pr105314.c In-Reply-To: <alpine.DEB.2.20.2401112257440.5892@tpp.orcam.me.uk> Message-ID: <alpine.DEB.2.20.2401112306560.5892@tpp.orcam.me.uk> References: <alpine.DEB.2.20.2401112257440.5892@tpp.orcam.me.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787839056742070281 X-GMAIL-MSGID: 1787839056742070281 |
Series |
RISC-V/testsuite: A couple of improvements for pr105314.c
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Maciej W. Rozycki
Jan. 11, 2024, 11:35 p.m. UTC
The optimization levels pr105314.c is iterated over are needlessly overridden with "-O2", limiting the coverage of the test case to that level, perhaps with additional options the original optimization level has been supplied with. We could prevent the extra iterations other than "-O2" from being run, but the transformation made by if-conversion is also expected to happen at other optimization levels, so include them all, and also make sure no reverse-condition branch appears in output, moving the `dg-final' command to the bottom, as with most test cases. gcc/testsuite/ * gcc.target/riscv/pr105314.c: Replace `dg-options' command with `dg-skip-if'. Also reject "bne" with `dg-final'. --- Hi, Technically it's not a single self-contained change and it could be 3 instead, but I think there's little point in splitting it further. Maciej --- gcc/testsuite/gcc.target/riscv/pr105314.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) gcc-test-riscv-pr105314-levels.diff
Comments
LGTM On Fri, Jan 12, 2024 at 7:36 AM Maciej W. Rozycki <macro@embecosm.com> wrote: > > The optimization levels pr105314.c is iterated over are needlessly > overridden with "-O2", limiting the coverage of the test case to that > level, perhaps with additional options the original optimization level > has been supplied with. We could prevent the extra iterations other > than "-O2" from being run, but the transformation made by if-conversion > is also expected to happen at other optimization levels, so include them > all, and also make sure no reverse-condition branch appears in output, > moving the `dg-final' command to the bottom, as with most test cases. > > gcc/testsuite/ > * gcc.target/riscv/pr105314.c: Replace `dg-options' command with > `dg-skip-if'. Also reject "bne" with `dg-final'. > --- > Hi, > > Technically it's not a single self-contained change and it could be 3 > instead, but I think there's little point in splitting it further. > > Maciej > --- > gcc/testsuite/gcc.target/riscv/pr105314.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > gcc-test-riscv-pr105314-levels.diff > Index: gcc/gcc/testsuite/gcc.target/riscv/pr105314.c > =================================================================== > --- gcc.orig/gcc/testsuite/gcc.target/riscv/pr105314.c > +++ gcc/gcc/testsuite/gcc.target/riscv/pr105314.c > @@ -1,7 +1,6 @@ > /* PR rtl-optimization/105314 */ > /* { dg-do compile } */ > -/* { dg-options "-O2" } */ > -/* { dg-final { scan-assembler-not "\tbeq\t" } } */ > +/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */ > > long > foo (long a, long b, long c) > @@ -10,3 +9,5 @@ foo (long a, long b, long c) > a = 0; > return a; > } > + > +/* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */
Index: gcc/gcc/testsuite/gcc.target/riscv/pr105314.c =================================================================== --- gcc.orig/gcc/testsuite/gcc.target/riscv/pr105314.c +++ gcc/gcc/testsuite/gcc.target/riscv/pr105314.c @@ -1,7 +1,6 @@ /* PR rtl-optimization/105314 */ /* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not "\tbeq\t" } } */ +/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */ long foo (long a, long b, long c) @@ -10,3 +9,5 @@ foo (long a, long b, long c) a = 0; return a; } + +/* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */