Date: Thu, 01 Dec 2022 09:48:06 +0800 In-Reply-To: <20221128171950.gn25...@gate.crashing.org> (Segher Boessenkool's message of "Mon, 28 Nov 2022 11:19:50 -0600") Message-ID: <7e4jufyjvt....@pike.rch.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
Segher Boessenkool <seg...@kernel.crashing.org> writes: > On Mon, Nov 28, 2022 at 03:51:59PM +0800, Jiufu Guo wrote: >> Jiufu Guo via Gcc-patches <gcc-patches@gcc.gnu.org> writes: >> > Segher Boessenkool <seg...@kernel.crashing.org> 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)) I just submit a simple patch for this: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607589.html Thanks for comments! BR, Jeff (Jiufu) > > > Segher