From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 8FECD387084B; Tue, 12 May 2020 14:59:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8FECD387084B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 04CEx0Io031988; Tue, 12 May 2020 09:59:01 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 04CEwxpV031987; Tue, 12 May 2020 09:58:59 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 12 May 2020 09:58:59 -0500 From: Segher Boessenkool To: luoxhu Cc: luoxhu--- via Gcc-patches , linkw@gcc.gnu.org, joseph@codesourcery.com, richard.sandiford@arm.com, jakub@redhat.com, wschmidt@linux.ibm.com Subject: Re: [PATCH v2] Fold (add -1; zero_ext; add +1) operations to zero_ext when not overflow (PR37451, part of PR61837) Message-ID: <20200512145859.GC31009@gate.crashing.org> References: <20200415084755.72653-1-luoxhu@linux.ibm.com> <20200417012140.GJ26902@gate.crashing.org> <20200417163202.GM26902@gate.crashing.org> <06f01ea4-2a9d-2314-0136-d333512c70dd@linux.ibm.com> <25612ac8-73f7-8cef-f2d6-8b220337dec3@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-18.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 12 May 2020 14:59:09 -0000 Hi! On Tue, May 12, 2020 at 02:48:40PM +0800, luoxhu wrote: > diff --git a/gcc/testsuite/gcc.target/powerpc/doloop-2.c b/gcc/testsuite/gcc.target/powerpc/doloop-2.c > new file mode 100644 > index 00000000000..dc8516bb0ab > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/doloop-2.c > @@ -0,0 +1,14 @@ > +/* { dg-do compile { target powerpc*-*-* } } */ Just { dg-do compiler } please, *everything* that runs this testsuite is powerpc*-*-*; but compile is the default as well, so you can leave that line completely out as well, if you want. > +/* { dg-final { scan-assembler-not "-1" } } */ This will fail the test for the string "-1" anywhere in the file. Like, if it was called "doloop-1.c" it would fail, or "doloop-12345.c". \m and \M can help for that last case, but you probably want to make the regex a bit more selective ;-) (And, document what it doesn't want to see, if it isn't really obvious?) Segher