[ARM] Identity shuffles are legal
commit856cf6f9e946cf4f790aad58dd341b71f73dfb7e
authorDavid Green <david.green@arm.com>
Wed, 2 Oct 2019 11:40:51 +0000 (2 11:40 +0000)
committerDavid Green <david.green@arm.com>
Wed, 2 Oct 2019 11:40:51 +0000 (2 11:40 +0000)
tree74a63002e6f24c5f0ab6cc1b427d9f3d4b121680
parent386cf6d2c937de7dc975e8cc0127e6fdd8edb0a1
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373446 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/Thumb2/mve-shuffleext.ll