From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 4EEBE3857013 for ; Fri, 10 Jul 2020 13:09:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4EEBE3857013 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06AD1enF066116; Fri, 10 Jul 2020 09:09:27 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bpbc4kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 09:09:27 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06AD2bAT070070; Fri, 10 Jul 2020 09:09:27 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bpbc4kd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 09:09:27 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06AD5aS5012137; Fri, 10 Jul 2020 13:09:26 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma03dal.us.ibm.com with ESMTP id 326bbtx3cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 13:09:26 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06AD9Pda37749202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 13:09:25 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E20B112062; Fri, 10 Jul 2020 13:09:25 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21610112066; Fri, 10 Jul 2020 13:09:25 +0000 (GMT) Received: from genoa (unknown [9.40.192.157]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 10 Jul 2020 13:09:25 +0000 (GMT) From: Jiufu Guo To: Martin =?utf-8?Q?Li=C5=A1ka?= Cc: Jiufu Guo via Gcc-patches , Jan Hubicka , wschmidt@linux.ibm.com, segher@kernel.crashing.org, Richard Biener , "Bin.Cheng" Subject: Re: [PATCH V2] PING^2 correct COUNT and PROB for unrolled loop References: <1580717822-6073-1-git-send-email-guojiufu@linux.ibm.com> <20200203162337.GK22868@kam.mff.cuni.cz> <5c8bedfd-0f8c-53de-9479-025b4c3d3a01@suse.cz> Date: Fri, 10 Jul 2020 21:09:22 +0800 In-Reply-To: <5c8bedfd-0f8c-53de-9479-025b4c3d3a01@suse.cz> ("Martin \=\?utf-8\?Q\?Li\=C5\=A1ka\=22's\?\= message of "Fri, 10 Jul 2020 09:37:06 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-10_05:2020-07-10, 2020-07-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 suspectscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100090 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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: Fri, 10 Jul 2020 13:09:29 -0000 Hi Martin, Martin Li=C5=A1ka writes: > On 7/10/20 4:14 AM, Jiufu Guo wrote: >> Thanks so much for your time and kindly help!!! > > And I run your patch on SPEC2006 with: > https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549728.html > > Doing that I see just few changes: > > diff -qr /tmp/before /tmp/after > Files /tmp/before/Meat.fppized.f90.000i.profile-report and /tmp/after/Mea= t.fppized.f90.000i.profile-report differ > Files /tmp/before/bezier.cpp.000i.profile-report and /tmp/after/bezier.cp= p.000i.profile-report differ > Files /tmp/before/module_big_step_utilities_em.fppized.f90.000i.profile-r= eport and /tmp/after/module_big_step_utilities_em.fppized.f90.000i.profile-= report differ > Files /tmp/before/module_cu_bmj.fppized.f90.000i.profile-report and /tmp/= after/module_cu_bmj.fppized.f90.000i.profile-report differ > Files /tmp/before/momx2.f.000i.profile-report and /tmp/after/momx2.f.000i= .profile-report differ > Files /tmp/before/momx3.f.000i.profile-report and /tmp/after/momx3.f.000i= .profile-report differ > Files /tmp/before/tml.f.000i.profile-report and /tmp/after/tml.f.000i.pro= file-report differ > Files /tmp/before/tranx2.f.000i.profile-report and /tmp/after/tranx2.f.00= 0i.profile-report differ > Files /tmp/before/tranx3.f.000i.profile-report and /tmp/after/tranx3.f.00= 0i.profile-report differ > > But I see few regression, e.g.: > > $ cat bezier.ii > int bezier_value_t, bezier_value_du_1; > int bezier_value_u[4], bezier_value_du[4]; > void bezier_value() { > int i =3D 1; > for (; i < 4; i++) { > bezier_value_u[i] =3D 1; > bezier_value_du[i] =3D i * bezier_value_u[i - 1]; > bezier_value_t =3D bezier_value_du_1; > } > } > > $ g++ bezier.ii -c -march=3Dnative -O3 -Wno-multichar -Wno-aggressive-loo= p-optimizations -fdump-tree-pcom=3D/tmp/bad.txt > ... > > And your patch changed: > > - [local count: 134217728]: > + [local count: 89478486]: > > where the function looks like: > > [local count: 268435456]: > ... > if (ivtmp_45 > 1) > goto ; [50.00%] > else > goto ; [50.00%] > > [local count: 89478486]: > goto ; [100.00%] > > So 89478486 !=3D 268435456 / 2. That seems a regression caused by your pa= tch. > > Can you please check it? Thanks a lot for your tests and findings! Sure, I will have a check. BR. Jiufu, > Martin