[ARM] Identity shuffles are legal
authorDavid Green <david.green@arm.com>
Wed, 2 Oct 2019 11:40:51 +0000 (11:40 +0000)
committerDavid Green <david.green@arm.com>
Wed, 2 Oct 2019 11:40:51 +0000 (11:40 +0000)
commitc9b5ab8b1c7f40983538dc3c06f3db6d04364ca8
tree37b959b345d2625f6e425bcffa513c8cf2e9d555
parent353ac42ce2f2250e4dacc533aed71285adf372df
[ARM] Identity shuffles are legal

Identity shuffles, of the form (0, 1, 2, 3, ...) are perfectly OK under MVE
(they essentially just become bitcasts). We were not catching that in the
existing set of what we considered legal though. On NEON, they would be covered
by vext's, but that is not generally available in MVE.

This uses ShuffleVectorInst::isIdentityMask which is a little odd to use here
but does what we want and prevents us from just rewriting what is the same
function.

Differential Revision: https://reviews.llvm.org/D68241

llvm-svn: 373446
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-shuffleext.ll