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 42F633858C62; Mon, 28 Nov 2022 17:20:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 42F633858C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass 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 2ASHJoPv024491; Mon, 28 Nov 2022 11:19:50 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 2ASHJoSF024490; Mon, 28 Nov 2022 11:19:50 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 28 Nov 2022 11:19:50 -0600 From: Segher Boessenkool To: Jiufu Guo Cc: Jiufu Guo via Gcc-patches , "Kewen.Lin" , dje.gcc@gmail.com, linkw@gcc.gnu.org Subject: Re: [PATCH V2] rs6000: Support to build constants by li/lis+oris/xoris Message-ID: <20221128171950.GN25951@gate.crashing.org> References: <20221026114052.17713-1-guojiufu@linux.ibm.com> <9331dba8-f346-37e5-3340-055f2c4d9245@linux.ibm.com> <20221125144309.GG25951@gate.crashing.org> <7ebkor21hd.fsf@pike.rch.stglabs.ibm.com> <7e5yez1ppc.fsf@pike.rch.stglabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e5yez1ppc.fsf@pike.rch.stglabs.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 28, 2022 at 03:51:59PM +0800, Jiufu Guo wrote: > Jiufu Guo via Gcc-patches writes: > > Segher Boessenkool writes: > >>> > + else > >>> > + { > >>> > + emit_move_insn (temp, > >>> > + GEN_INT (((ud2 << 16) ^ 0x80000000) - 0x80000000)); > >>> > + if (ud1 != 0) > >>> > + emit_move_insn (temp, gen_rtx_IOR (DImode, temp, GEN_INT (ud1))); > >>> > + emit_move_insn (dest, > >>> > + gen_rtx_ZERO_EXTEND (DImode, > >>> > + gen_lowpart (SImode, temp))); > >>> > + } > >> > >> Why this? Please just write it in DImode, do not go via SImode? > > Thanks for catch this. Yes, gen_lowpart with DImode would be ok. > Oh, Sorry. DImode can not be used here. The genreated pattern with > DImode can not be recognized. Using SImode is to match 'rlwxx'. There are patterns that accept DImode for rlwinm just fine. Please use (and:DI (const_int 0xffffffff) (x:DI)) not the obfuscated (zero_extend:DI (subreg:SI (x:DI) LOWBYTE)) Segher