[ARM] Identity shuffles are legal
commit2e3f961efc0f0d4ee159452757c5448aa4473c12
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
parent6a653e66dbff544a305c49758342280429d4b7e7
[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