From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63331 invoked by alias); 26 Apr 2019 18:23:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 63322 invoked by uid 89); 26 Apr 2019 18:23:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Apr 2019 18:23:44 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x3QINeGG025653; Fri, 26 Apr 2019 13:23:40 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x3QINdoQ025651; Fri, 26 Apr 2019 13:23:39 -0500 Date: Fri, 26 Apr 2019 18:58:00 -0000 From: Segher Boessenkool To: Richard Biener Cc: "Kewen.Lin" , GCC Patches , bin.cheng@linux.alibaba.com, Bill Schmidt , jakub@redhat.com Subject: Re: [PATCH, RFC, rs6000] PR80791 Consider doloop in ivopts Message-ID: <20190426182339.GF8599@gate.crashing.org> References: <20190425121616.GS8599@gate.crashing.org> <351b6da4-48b5-2e34-493f-bdf709408b3f@linux.ibm.com> <1147bc77-6d03-46f4-7d74-16deda93cbd7@linux.ibm.com> <20190426165943.GC8599@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg01089.txt.bz2 On Fri, Apr 26, 2019 at 07:51:05PM +0200, Richard Biener wrote: > On April 26, 2019 6:59:43 PM GMT+02:00, Segher Boessenkool wrote: > >So, make it a doloop in gimple, and still have the rtl pass, but that > >only reverts it to a non-doloop if it turns out it has to. Does that > >sound like a good plan? > > Yes, that's more or less what I had in mind. Note that you'd have a doloop early in RTL, sth we might not expect? I don't think there are any fundamental reasons to not have that. Maybe some adjustments are needed, sure. > Maybe we already have a GIMPLE way of saying decrement and test zero (one of the overflow builtins?), if not we'd need to add such to have > > Flag_1 = IFN_decandtest (i_2); > If (Flag_1! = 0) > ... > > As 'doloop-end' on GIMPLE. Just adjusting RTL expansion to catch a regular Dec and test would be possible > As well of course. I don't know if we should have any special instructions in GIMPLE for this. Maybe it is enough to just mark up the loop? It would be a lot simpler, if it *works* that is :-) Segher