From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 79DE13858D35 for ; Tue, 2 Nov 2021 13:20:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 79DE13858D35 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 9D0521FD3D; Tue, 2 Nov 2021 13:20:47 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 5B542A3B84; Tue, 2 Nov 2021 13:20:47 +0000 (UTC) Date: Tue, 2 Nov 2021 14:20:47 +0100 (CET) From: Richard Biener To: Jiufu Guo cc: gcc-patches@gcc.gnu.org, amker.cheng@gmail.com, wschmidt@linux.ibm.com, segher@kernel.crashing.org, dje.gcc@gmail.com, jlaw@tachyum.com Subject: Re: [PATCH] Check number of iterations for test cases pr101145 In-Reply-To: <20211101025446.55538-1-guojiufu@linux.ibm.com> Message-ID: References: <20211101025446.55538-1-guojiufu@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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-List-Received-Date: Tue, 02 Nov 2021 13:20:49 -0000 On Mon, 1 Nov 2021, Jiufu Guo wrote: > PR101145 is supporting if the number of iterations can be calculated > for the 'until wrap' condition. Current test cases are checking if > the loop can be vectorized, if a loop can be vectorized then the number > of interations is known. While it would be better to check the loop's > number of iterations directly. This patch updates the test cases > accordingly. > > Bootstrap and regtest pass on ppc,ppc64le and x86_64. > Is this ok for trunk? Not sure - the motivation was to make the loop vectorizable so a vectorized check is strictly more powerful. What's the problem with the existing test? Richard. > BR, > Jiufu > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/pr101145_1.c: Update case. > * gcc.dg/vect/pr101145_2.c: Update case. > * gcc.dg/vect/pr101145_3.c: Update case. > > --- > gcc/testsuite/gcc.dg/vect/pr101145_1.c | 2 +- > gcc/testsuite/gcc.dg/vect/pr101145_2.c | 2 +- > gcc/testsuite/gcc.dg/vect/pr101145_3.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_1.c b/gcc/testsuite/gcc.dg/vect/pr101145_1.c > index 9332b2c4257..13a89fa6863 100644 > --- a/gcc/testsuite/gcc.dg/vect/pr101145_1.c > +++ b/gcc/testsuite/gcc.dg/vect/pr101145_1.c > @@ -10,4 +10,4 @@ > > #include "pr101145.inc" > > -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */ > diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_2.c b/gcc/testsuite/gcc.dg/vect/pr101145_2.c > index fa2c6be689a..5265491b98d 100644 > --- a/gcc/testsuite/gcc.dg/vect/pr101145_2.c > +++ b/gcc/testsuite/gcc.dg/vect/pr101145_2.c > @@ -10,4 +10,4 @@ > > #include "pr101145.inc" > > -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */ > diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_3.c b/gcc/testsuite/gcc.dg/vect/pr101145_3.c > index 9f43c82593f..ffda26cf0bc 100644 > --- a/gcc/testsuite/gcc.dg/vect/pr101145_3.c > +++ b/gcc/testsuite/gcc.dg/vect/pr101145_3.c > @@ -10,4 +10,4 @@ > > #include "pr101145.inc" > > -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */ > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)