[ARM] Fold VCMP into VPT
commit437310b30fd57aa0afdc3188ce256eb5cb445b21
authorDavid Green <david.green@arm.com>
Mon, 16 Sep 2019 13:02:41 +0000 (16 13:02 +0000)
committerDavid Green <david.green@arm.com>
Mon, 16 Sep 2019 13:02:41 +0000 (16 13:02 +0000)
tree6b7cdeb44c0e76eda52693578bff4f4d295f291f
parentcba3b2c1c37a84400b7d96b00fd5dcaad611acd4
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371982 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
lib/Target/ARM/ARMInstrMVE.td
lib/Target/ARM/MVEVPTBlockPass.cpp
test/CodeGen/Thumb2/mve-masked-ldst.ll
test/CodeGen/Thumb2/mve-masked-load.ll
test/CodeGen/Thumb2/mve-masked-store.ll
test/CodeGen/Thumb2/mve-pred-and.ll
test/CodeGen/Thumb2/mve-pred-not.ll
test/CodeGen/Thumb2/mve-pred-or.ll
test/CodeGen/Thumb2/mve-vcmpf.ll
test/CodeGen/Thumb2/mve-vcmpfr.ll
test/CodeGen/Thumb2/mve-vcmpfz.ll
test/CodeGen/Thumb2/mve-vpt-block.mir
test/CodeGen/Thumb2/mve-vpt-block2.mir
test/CodeGen/Thumb2/mve-vpt-block3.mir
test/CodeGen/Thumb2/mve-vpt-block4.mir
test/CodeGen/Thumb2/mve-vpt-block5.mir
test/CodeGen/Thumb2/mve-vpt-block6.mir
test/CodeGen/Thumb2/mve-vpt-block7.mir
test/CodeGen/Thumb2/mve-vpt-block8.mir
test/CodeGen/Thumb2/mve-vpt-nots.mir