[ARM] MVE integer compares and selects
commitbc376c5e79ccbc895ca339a105e75c312afe1be2
authorDavid Green <david.green@arm.com>
Wed, 24 Jul 2019 11:08:14 +0000 (24 11:08 +0000)
committerDavid Green <david.green@arm.com>
Wed, 24 Jul 2019 11:08:14 +0000 (24 11:08 +0000)
tree663fc772c3e76ce0f278ec27ec5363a6904c11d6
parent7c4e3ce3aad6a51b4f2c59ef97518398e1b4b19e
[ARM] MVE integer compares and selects

This adds the very basics for MVE vector predication, adding integer VCMP and
VSEL instruction support. This is done through predicate registers (MVT::v16i1,
MVT::v8i1, MVT::v4i1), but otherwise using same mechanics as NEON to custom
lower setcc's through ARMISD::VCXX nodes (VCEQ, VCGT, VCEQZ, etc).

An extra VCNE was added, as this can be handled sensibly by MVE's expanded
number of VCMP condition codes. (There are also VCLE and VCLT which are added
later).

VPSEL is also added here, simply selecting on the vselect.

Original code by David Sherwood.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366885 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrMVE.td
lib/Target/ARM/ARMInstrNEON.td
test/CodeGen/Thumb2/mve-vcmp.ll [new file with mode: 0644]
test/CodeGen/Thumb2/mve-vcmpz.ll [new file with mode: 0644]
test/CodeGen/Thumb2/mve-vpsel.ll [new file with mode: 0644]