[PATCH] D92470: [ARM] Common inverse constant predicates to VPNOT

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 02:19:29 PST 2020


dmgreen updated this revision to Diff 310116.
dmgreen added a comment.

Our VPT block creation certainly isn't optimal in a lot of cases, that is very true.  I think in general a VPNOT is going to be better or equal to a MOV;VMSR pair, so long ranges or intervening instructions are probably OK. If there is a different mask used between the two though, that case would be better to not try and use VPNOTs of previous values that just need to be spilled and reloaded.

I have made this only track a single predicate at a time, invalidating it as we scan through and reusing it or a VPNOT of it as we can.

My original motivating case for this isn't really a lot better - unfortunately scheduling comes along ruins everything. I may have to add something extra to sort that out too. The test cases here (along with the newly added ones) look OK though, baring one that has some strange register allocation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92470/new/

https://reviews.llvm.org/D92470

Files:
  llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
  llvm/test/CodeGen/Thumb2/mve-pred-constfold.ll
  llvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92470.310116.patch
Type: text/x-patch
Size: 12085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201208/7c7f3dcd/attachment.bin>


More information about the llvm-commits mailing list