[ARM] Fold VCMP into VPT
authorDavid Green <david.green@arm.com>
Mon, 16 Sep 2019 13:02:41 +0000 (13:02 +0000)
committerDavid Green <david.green@arm.com>
Mon, 16 Sep 2019 13:02:41 +0000 (13:02 +0000)
commitce7328cb61d0aedae2261d0e50c259336f125e88
tree62e4ad46687ff49bf39234f1084a929106e80590
parentc5cd80815666f535ffc37cd582e7576a29ba6816
[ARM] Fold VCMP into VPT

MVE has VPT instructions, which perform the duties of both a VCMP and a VPST in
a single instruction, performing the compare and starting the VPT block in one.
This teaches the MVEVPTBlockPass to fold them, searching back through the
basicblock for a valid VCMP and creating the VPT from its operands.

There are some changes to the VPT instructions to accommodate this, altering
the order of the operands to match the VCMP better, and changing P0 register
defs to be VPR defs, as is used in other places.

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

llvm-svn: 371982
20 files changed:
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
llvm/test/CodeGen/Thumb2/mve-masked-ldst.ll
llvm/test/CodeGen/Thumb2/mve-masked-load.ll
llvm/test/CodeGen/Thumb2/mve-masked-store.ll
llvm/test/CodeGen/Thumb2/mve-pred-and.ll
llvm/test/CodeGen/Thumb2/mve-pred-not.ll
llvm/test/CodeGen/Thumb2/mve-pred-or.ll
llvm/test/CodeGen/Thumb2/mve-vcmpf.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfz.ll
llvm/test/CodeGen/Thumb2/mve-vpt-block.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block2.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block3.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block4.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block5.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block6.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block7.mir
llvm/test/CodeGen/Thumb2/mve-vpt-block8.mir
llvm/test/CodeGen/Thumb2/mve-vpt-nots.mir