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)) Segher