[llvm] r221684 - [X86] Add missing check for 'isINSERTPSMask' in method 'isShuffleMaskLegal'.

Andrea Di Biagio andrea.dibiagio at gmail.com
Thu Nov 13 03:01:09 PST 2014


Hi Simon,

On Wed, Nov 12, 2014 at 9:39 PM, Simon Pilgrim <llvm-dev at redking.me.uk> wrote:
>
> Its rather odd that a lot of those swizzle tests only got optimised because of the addition of the isINSERTPSMask.
>
> By the looks of it isSHUFPMask only matches shufps/shufpd with 2 distinct inputs - it doesn’t recognise it can be used with the same input to both arguments. Similarly isSHUFDMask only matches against the first input. In fact most of the mask matching functions don’t seem to be good at dealing with more general input cases.
>
> Most of this would be trivial to fix but would involve some refactoring of the old vector shuffle lowering code - is this worth doing now or waiting until the old code gets removed?

I agree with your analysis. Current implementation of isSHUFPMask is
probably too simple and could be improved in some cases.
That said, my opinion is that we should probably wait until the old
shuffle lowering code is removed.

Cheers,
Andrea




More information about the llvm-commits mailing list