[PATCH] i386, expand: Optimize also 256-bit and 512-bit permutatations as vpmovzx if possible [PR95905]
Richard Biener
rguenther@suse.de
Wed Jan 13 10:05:08 GMT 2021
On Wed, 13 Jan 2021, Jakub Jelinek wrote:
> On Wed, Jan 13, 2021 at 08:26:49AM +0100, Richard Biener wrote:
> > + if (op1 && op0 != op1)
> > + op1 = force_reg (vmode, op1);
> >
> > code (presumably to handle RTX sharing here)?
>
> That could be actually simplified, incrementally e.g. to:
> if (op0)
> {
> rtx nop0 = force_reg (vmode, op0);
> if (op0 == op1)
> op1 = nop0;
> op0 = nop0;
> }
> - if (op1 && op0 != op1)
> + if (op1)
> op1 = force_reg (vmode, op1);
>
> (because the outer force_reg in force_reg (vmode, force_reg (vmode, X))
> just returns its argument).
I see. Thanks for clarifying in the earlier mail - the non-x86
parts of the patch are OK.
Thanks,
Richard.
More information about the Gcc-patches
mailing list