From patchwork Thu Jan 11 23:35:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 187510 Return-Path: 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 (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 ; 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 ; 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 ; 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 (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" To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] RISC-V/testsuite: Widen coverage for pr105314.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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" } } */ From patchwork Thu Jan 11 23:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 187511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1790127dyi; Thu, 11 Jan 2024 15:37:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6LG94lDqrcqmbqxLHrCTcXtIOg0KCpWovQ1tBObx2itPbLBRh9C/iw7NdKccH1Y6t8lo5 X-Received: by 2002:a05:6808:11cb:b0:3bb:fc6b:e57e with SMTP id p11-20020a05680811cb00b003bbfc6be57emr100176oiv.100.1705016245780; Thu, 11 Jan 2024 15:37:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705016245; cv=pass; d=google.com; s=arc-20160816; b=TrjPVSl/nX/cHyw1p5CeBLttU3rSP3ZolrYV8PDDmtztTRScTMusISlcz76fzBW4QF wPSTwu/AcIooSr5sUsowhIC61h2gedrLtrCVQ+WSXwb8Lt/d9/xTM7qHNxyHfT0bpNUU kbtUCa7uN+XHOf1+LpCM5CBNYJLoMvT5xexSJNh0PKPj5tWhi5w48Boc6CRHfC1m4WVu WLRfpu4dHpbeQawH1614k52hYyre6KqWvX6VcKAoX9l27tyP9NCq3WRtlJNEqAdIaIhj 6kjzSZpLxdx5qz7wVuq6Eqwf/PiE+FESk0QEaKgagKeBLbd9rpMH5iPR1bK2iU/QY2SZ z/FQ== 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:cc:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=i5Cg9XDHyefxfeguom4VBbU8njHx2MyN7uzW+yhll8Q=; fh=dp1z4I3tVhinwswv7IAFxpunWK+Ws/fGQfmox9vHv3I=; b=iUC8HUyyu9KNfh+3NVBpLoA1y+KiL+B9MbcaRaeHyWuu6ww4OF8ylT8XMI+Jmivf5p +2DvBoB+wFogJpA07HcVj0dM2Zsb6bnJzpw68nuFNXQcnJY1IK8kz/nqlAf1DNlFOver QtwaImFCnSG9/wZnZQNBayr19l5355yA+BcbT8GG3JfZ2SWTwCwbrBkHk+v0PoYmJW6O eLiHpAQHnJJ0FITukqPrbpVhe3PhngCgbcQbgRnSC3AjwsoTsdnVzv6xfn9wmDsGA/OZ i4q8YjXmPSZJRm8b8M7vlPEC43gaGAKg/GSCxTjnIjn6rveiYFPPqLSgLxixWoBcIAGa UFBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=Klxsn181; 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 z2-20020a0cda82000000b0067f8c3a5124si1805242qvj.507.2024.01.11.15.37.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 15:37:25 -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=Klxsn181; 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 2FF983858C2F for ; Thu, 11 Jan 2024 23:37:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id E48EC3858417 for ; Thu, 11 Jan 2024 23:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E48EC3858417 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 E48EC3858417 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705016155; cv=none; b=m4inx/IlJG1OSbb2P40KRe8f51XYsudsda8pTPoR1a4vv9mdfwOCHjNpsfxOVB7B3qU/AH8KOL9tVJKHdO7qUsOy89M2R1xfFofxlV1a4fgrSq2oO6N6hc7XO30DWtJqrIOmIWwulNYk75YJMzO4v9ea8zytHxS6tXRqwJHqrRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705016155; c=relaxed/simple; bh=wJwjlHYInDXvPSlnqCT08eO/7nkYsLLHl4JLZ8dWOjw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=p8+SA5YZtMs/0oCgsOLlZ7No0D5hcXP3XlDR9J382bgp1c3mFmKMwNFnlfIsebXIm9YXaTzAykzgxoEqK5ioXVucc6ZYvpzwdCI/v9rOeUeww8rBcPnHQgiga/Fuo8DRly9AFDMQjqfDevZJ7+/nm33Pm1aBO/uFAo9l9z/RNFc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40d6b4e2945so68609455e9.0 for ; Thu, 11 Jan 2024 15:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1705016151; x=1705620951; darn=gcc.gnu.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=i5Cg9XDHyefxfeguom4VBbU8njHx2MyN7uzW+yhll8Q=; b=Klxsn181VnD9tdYgGql26xe2QShlsWIT+dwKnIdToCzc0pQJ2Vk1YAXGtXmUxZLmNG IjHB1XwDtZctlo0+hKrl3VnpbrD9xVB0YOCYIdki/ErsK67HXafq0gSu2rL9JN0uni4e qDIogTI2teiUeummnsyHS+oA8v2XLb7BYiHCzN47A9/Kfo/wSfG+5JFMqIEX10QLr6Vh wqBjCjE8K3r9jSclkclcgK0YNNkE4DrPK8Z63nFnGE7jQi+wybv297Q/HAkn3rgGSXqZ +EvfWCi0t8Cyi+HyxWIAG7uY0HYtCSnOtjYLqA3aByJLBIAV+FypGXJ4b4Tb5R9bpYSu z1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705016151; x=1705620951; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=i5Cg9XDHyefxfeguom4VBbU8njHx2MyN7uzW+yhll8Q=; b=kAZRS+/Eg+6rSoom1sZIW7J8BOe+ZIn+LG3xivU/y7ihiugL3i8I8asGIRvqYuzp37 ELaIZiiafLciG7RCBnBs1mYId3hVCKU2ebKAMfuKuW1dtKWJGClQUmwUtV03JoAKsCPe tPhMDrV5+Q9vmHkhuXBUsb1xMTg2Ml5ldXq+wQrVaZ8DMvKPcM58q9hTXefFGW1wNW/4 sXwSAddjq/P1t0SusO8ocB9cj/nwjt4qZRwZNH7atYGAE21gcPYQ8ARbLnpnaLUBXsh/ rQqwMEoBrmPEwXXBQZ3dAoNpjylMg3maBmKoYmN8qvZjIATOBWYBXyS0i7a7vJTWeqor Fcug== X-Gm-Message-State: AOJu0Yw/X4EDvl2lnK6XIeH8mfP/8A6uGhifI7wgAmUwox90meHuZ48H gqo6uLiBsTEESxlkXLvhEkZpH/955B+SuaMREts9wI+a8RU= X-Received: by 2002:a05:600c:474c:b0:40e:4cc6:9fe5 with SMTP id w12-20020a05600c474c00b0040e4cc69fe5mr187812wmo.141.1705016151707; Thu, 11 Jan 2024 15:35:51 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id o5-20020a170906358500b00a2c189de7b8sm1103714ejb.124.2024.01.11.15.35.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2024 15:35:51 -0800 (PST) Date: Thu, 11 Jan 2024 23:35:49 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: Andrew Waterman , Jim Wilson , Kito Cheng , Palmer Dabbelt Subject: [PATCH 2/2] RISC-V/testsuite: Also verify if-conversion runs for pr105314.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787839114568453865 X-GMAIL-MSGID: 1787839114568453865 Verify that if-conversion succeeded through noce_try_store_flag_mask, as per PR rtl-optimization/105314, tightening the test case and making it explicit. gcc/testsuite/ * gcc.target/riscv/pr105314.c: Scan the RTL "ce1" pass too. --- gcc/testsuite/gcc.target/riscv/pr105314.c | 2 ++ 1 file changed, 2 insertions(+) gcc-test-riscv-pr105314-rtl.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,6 +1,7 @@ /* PR rtl-optimization/105314 */ /* { dg-do compile } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */ +/* { dg-options "-fdump-rtl-ce1" } */ long foo (long a, long b, long c) @@ -10,4 +11,5 @@ foo (long a, long b, long c) return a; } +/* { dg-final { scan-rtl-dump-times "if-conversion succeeded through noce_try_store_flag_mask" 1 "ce1" } } */ /* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */