[PATCH] D66577: [ARM] Fold VCMP into VPT

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 02:17:02 PDT 2019


dmgreen created this revision.
dmgreen added reviewers: t.p.northover, samparker, SjoerdMeijer, simon_tatham, ostannard.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.
dmgreen added a comment.

I was tired as looking at so many VPST instructions.

On an aside, P0 seems like a better choice for codegen than VPR from what I understand, more accurately specifying what is modified in the regsiters. I feel like the registers should be more "related" than they are, being subregisters of each other or something. But I've not looked into that more thoroughly.


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 these, 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.


https://reviews.llvm.org/D66577

Files:
  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-nots.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66577.216565.patch
Type: text/x-patch
Size: 98223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190822/660c8276/attachment.bin>


More information about the llvm-commits mailing list