From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 87E503857C7C for ; Fri, 10 Jul 2020 07:37:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87E503857C7C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 646F1ACF9; Fri, 10 Jul 2020 07:37:08 +0000 (UTC) Subject: Re: [PATCH V2] PING^2 correct COUNT and PROB for unrolled loop To: Jiufu Guo Cc: Jiufu Guo via Gcc-patches , Jan Hubicka , wschmidt@linux.ibm.com, segher@kernel.crashing.org, Richard Biener , "Bin.Cheng" References: <1580717822-6073-1-git-send-email-guojiufu@linux.ibm.com> <20200203162337.GK22868@kam.mff.cuni.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <5c8bedfd-0f8c-53de-9479-025b4c3d3a01@suse.cz> Date: Fri, 10 Jul 2020 09:37:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 07:37:11 -0000 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/Meat.fppized.f90.000i.profile-report differ Files /tmp/before/bezier.cpp.000i.profile-report and /tmp/after/bezier.cpp.000i.profile-report differ Files /tmp/before/module_big_step_utilities_em.fppized.f90.000i.profile-report 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.profile-report differ Files /tmp/before/tranx2.f.000i.profile-report and /tmp/after/tranx2.f.000i.profile-report differ Files /tmp/before/tranx3.f.000i.profile-report and /tmp/after/tranx3.f.000i.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 = 1; for (; i < 4; i++) { bezier_value_u[i] = 1; bezier_value_du[i] = i * bezier_value_u[i - 1]; bezier_value_t = bezier_value_du_1; } } $ g++ bezier.ii -c -march=native -O3 -Wno-multichar -Wno-aggressive-loop-optimizations -fdump-tree-pcom=/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 != 268435456 / 2. That seems a regression caused by your patch. Can you please check it? Martin