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 06F0B385B833 for ; Fri, 3 Apr 2020 09:36:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 06F0B385B833 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rguenther@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 84CF4AC2C; Fri, 3 Apr 2020 09:36:29 +0000 (UTC) Date: Fri, 3 Apr 2020 11:36:29 +0200 (CEST) From: Richard Biener To: Thomas Schwinge cc: Tom de Vries , gcc-patches@gcc.gnu.org, "Joseph S. Myers" , Jason Merrill , Feng Xue OS Subject: Re: Revert "[nvptx, libgomp] Update pr85381-{2,4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++) In-Reply-To: <877dyxnfa0.fsf@euler.schwinge.homeip.net> Message-ID: References: <0f331251-85c6-2cfe-e7aa-54bc7966ce57@redhat.com> <877dyxnfa0.fsf@euler.schwinge.homeip.net> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-16.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, 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, 03 Apr 2020 09:36:32 -0000 On Fri, 3 Apr 2020, Thomas Schwinge wrote: > Hi! > > On 2020-04-02T11:12:48+0200, Richard Biener wrote: > > On Wed, 1 Apr 2020, Jason Merrill wrote: > > > >> On 4/1/20 9:36 AM, Richard Biener wrote: > >> > This does away with enabling -ffinite-loops at -O2+ for all languages > >> > and instead enables it selectively for C++ only. > > > I'm retesting the following [...] > > ..., which got pushed in commit 75efe9cb1f8938a713ce540dc3b27bc2afcd3fae > "c/94392 - only enable -ffinite-loops for C++". > > I pushed the attached in commit 4f6a0888de52a2e523a6fd4235fe7f8193819c3b > 'Revert "[nvptx, libgomp] Update pr85381-{2,4}.c test-cases" [PR89713, > PR94392]'. As can be observed in two nvptx offloading test cases > regressing, 'apparently now again "empty oacc loops are" no longer > "removed before expand"' (quoting myself from the commit log, adapting > Tom's commit log snippet from the reverted commit). > > It's not obvious to me how the "finite loop" property discussed/changed > in Richard's commit 75efe9cb1f8938a713ce540dc3b27bc2afcd3fae "c/94392 - > only enable -ffinite-loops for C++" relates to the previously observed > optimization of removing "empty oacc loops [...] before expand" (after > PR89713 commit c29c92c789d93848cc1c929838771bfc68cb272c "PR > tree-optimization/89713 - Assume loop with an exit is finite"), but > examining that in detail is for another day. For C we no longer have -ffinite-loops in effect but for C++ we still do. But since the testcase is c/c++ common I'd have expected it now fails "split" ... so an explicit -fno-finite-loops or -ffinite-loops with an explanation would be easier. Note there's now also the opportunity to set the loop flag for OpenACC/OpenMP annotated loops if any of that guarantees finiteness. (for GCC11 only please) Richard.