From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 44BE03858C39 for ; Wed, 25 Aug 2021 03:26:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 44BE03858C39 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17P3FPX1090115; Tue, 24 Aug 2021 23:26:38 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3andjg8dcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Aug 2021 23:26:38 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 17P3LuOM106307; Tue, 24 Aug 2021 23:26:38 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 3andjg8dcr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Aug 2021 23:26:38 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17P3EljF028012; Wed, 25 Aug 2021 03:26:37 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01dal.us.ibm.com with ESMTP id 3an9f77kec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Aug 2021 03:26:37 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17P3Qaa939453064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Aug 2021 03:26:36 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A888136051; Wed, 25 Aug 2021 03:26:36 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C13E8136055; Wed, 25 Aug 2021 03:26:35 +0000 (GMT) Received: from ltc.linux.ibm.com (unknown [9.10.229.42]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 25 Aug 2021 03:26:35 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 25 Aug 2021 11:26:35 +0800 From: guojiufu To: "Bin.Cheng" Cc: gcc-patches List , Richard Biener Subject: Re: Ping: [PATCH v2] Analyze niter for until-wrap condition [PR101145] In-Reply-To: References: <20210707124720.16330-1-guojiufu@linux.ibm.com> <569d241bba92a6b29be787bb61990740@imap.linux.ibm.com> <92d317f27080bcaca26a8fb6cc08f153@imap.linux.ibm.com> Message-ID: <3c6a31c34a4d12b4948238de02139a16@imap.linux.ibm.com> X-Sender: guojiufu@linux.ibm.com User-Agent: Roundcube Webmail/1.1.12 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: dM-WD43zfnZ8hXlHuIhVTTolcXCvKGOe X-Proofpoint-ORIG-GUID: G8Ains4LHFRq23AuYu26R8xkSIVqOhwQ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-25_01:2021-08-24, 2021-08-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 impostorscore=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 clxscore=1015 spamscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108250017 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: Wed, 25 Aug 2021 03:26:49 -0000 On 2021-08-16 09:33, Bin.Cheng wrote: > On Wed, Aug 4, 2021 at 10:42 AM guojiufu > wrote: >> ... >> >> diff --git a/gcc/testsuite/gcc.dg/vect/pr101145.inc >> >> b/gcc/testsuite/gcc.dg/vect/pr101145.inc >> >> new file mode 100644 >> >> index 00000000000..6eed3fa8aca >> >> --- /dev/null >> >> +++ b/gcc/testsuite/gcc.dg/vect/pr101145.inc >> >> @@ -0,0 +1,63 @@ >> >> +TYPE __attribute__ ((noinline)) >> >> +foo_sign (int *__restrict__ a, int *__restrict__ b, TYPE l, TYPE n) >> >> +{ >> >> + for (l = L_BASE; n < l; l += C) >> >> + *a++ = *b++ + 1; >> >> + return l; >> >> +} >> >> + >> >> +TYPE __attribute__ ((noinline)) >> >> +bar_sign (int *__restrict__ a, int *__restrict__ b, TYPE l, TYPE n) >> >> +{ >> >> + for (l = L_BASE_DOWN; l < n; l -= C) > I noticed that both L_BASE and L_BASE_DOWN are defined as l, which > makes this test a bit confusing. Could you clean the use of l, for > example, by using an auto var for the loop index invariable? > Otherwise the patch looks good to me. Thanks very much for the work. Hi, Sorry for bothering you here. I feel this would be an approval (with the comment) already :) With the change code to make it a little clear as: TYPE i; for (i = l; n < i; i += C) it may be ok to commit the patch to the trunk, right? BR, Jiufu > > Thanks, > bin >> >> + *a++ = *b++ + 1; >> >> + return l; >> >> +} >> >> + >> >> +int __attribute__ ((noinline)) neq (int a, int b) { return a != b; } >> >> + >> >> +int a[1000], b[1000]; >> >> +int fail; >> >> + >> >> +int ... >> >> diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_1.c >> >> b/gcc/testsuite/gcc.dg/vect/pr101145_1.c >> >> new file mode 100644 >> >> index 00000000000..94f6b99b893 >> >> --- /dev/null >> >> +++ b/gcc/testsuite/gcc.dg/vect/pr101145_1.c >> >> @@ -0,0 +1,15 @@ >> >> +/* { dg-require-effective-target vect_int } */ >> >> +/* { dg-options "-O3 -fdump-tree-vect-details" } */ >> >> +#define TYPE signed char >> >> +#define MIN -128 >> >> +#define MAX 127 >> >> +#define N_BASE (MAX - 32) >> >> +#define N_BASE_DOWN (MIN + 32) >> >> + >> >> +#define C 3 >> >> +#define L_BASE l >> >> +#define L_BASE_DOWN l >> >> +