From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 46241386197D for ; Tue, 13 Jul 2021 15:39:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 46241386197D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 16DFc4X8027693; Tue, 13 Jul 2021 10:38:04 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16DFc2V5027688; Tue, 13 Jul 2021 10:38:02 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 13 Jul 2021 10:38:02 -0500 From: Segher Boessenkool To: Richard Biener Cc: Jiufu Guo , gcc-patches@gcc.gnu.org, wschmidt@linux.ibm.com, dje.gcc@gmail.com, jlaw@tachyum.com, amker.cheng@gmail.com Subject: Re: [PATCH] Check type size for doloop iv on BITS_PER_WORD [PR61837] Message-ID: <20210713153802.GP1583@gate.crashing.org> References: <20210709020718.177302-1-guojiufu@linux.ibm.com> <20210709170832.GW1583@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-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no 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: Tue, 13 Jul 2021 15:39:08 -0000 On Mon, Jul 12, 2021 at 08:20:14AM +0200, Richard Biener wrote: > On Fri, 9 Jul 2021, Segher Boessenkool wrote: > > Almost all targets just use Pmode, but there is no such guarantee I > > think, and esp. some targets that do not have machine insns for this > > (but want to generate different code for this anyway) can do pretty much > > anything. > > > > Maybe using just Pmode here is good enough though? > > I think Pmode is a particularly bad choice and I'd prefer word_mode > if we go for any hardcoded mode. In many important cases you use a pointer as iteration variable. Is word_mode register size on most current targets? > s390x for example seems to handle > both SImode and DImode (but names the helper gen_doloop_si64 > for SImode?!). Yes, so Pmode will work fine for 390. It would be nice if we could allow multiple modes here, certainly. Can we? > But indeed it looks like somehow querying doloop_end > is going to be difficult since the expander doesn't have any mode, > so we'd have to actually try emit RTL here. Or add a well-designed target macro for this. "Which modes do we like for IVs", perhaps? Segher