On Mon, Feb 21, 2022 at 6:33 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Mon, Feb 21, 2022 at 06:01:00PM +0100, Uros Bizjak wrote: > > I remember the same issue in the past, so it looks like the fresh > > pseudo as destination gives RA some more freedom to do its magic. So, > > it is better to do: > > > > emit_move_insn (dest, gen_lowpart (wmode, t3)); > > > > then play with subregs on a destination, like: > > > > dest = lowpart_subreg (vmode, dest, mode); > > That is what I assumed too, but unfortunately on the pr89984-2.c > testcase that extra freedom resulted in worse code. > The inlined patch gave it that freedom, the attached patch does not > (unless dest is already SUBREG). > I think it might be useful to open a PR for GCC 13 and change the > attached patch to the inlined one once we can deal with it in the RA.
Agreed. Uros.