[PATCH] D76709: [Target][ARM] Adding MVE VPT Optimisation Pass

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 01:02:33 PDT 2020


Pierre-vh updated this revision to Diff 254716.
Pierre-vh marked an inline comment as done.
Pierre-vh added a comment.

`PrevVCMPResultKiller` is now correctly reset back to nullptr, but I didn't add a test for it as it was not useful (there was nothing to test).
It's pretty much an NFC, the behaviour is the exact same as before, but it's indeed more correct to reset it once a VCMP has been replaced by a VPNOT.

The reason why this change doesn't really impact the behaviour of the pass is that `PrevVCMPResultKiller` is either:

  - nullptr, so nothing happens.
- Contains the "VCMP Result Killer" for the current `PrevVCMP`  (Which is what we want)
- Contains the "VCMP Result Killer" for *a previous* `PrevVCMP`, which is not correct but doesn't cause issues, it's just going to call `setIsKill(false)` twice on the same operand.
  - This case would only happen if 2 VCMPs are replaced with VPNOTs in the same basic block, but the first one set `PrevVCMPResultKiller` while the second one didn't.

Correctly resetting it to nullptr after use just removes the third possibility.


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

https://reviews.llvm.org/D76709

Files:
  llvm/lib/Target/ARM/ARM.h
  llvm/lib/Target/ARM/ARMTargetMachine.cpp
  llvm/lib/Target/ARM/CMakeLists.txt
  llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
  llvm/test/CodeGen/ARM/O3-pipeline.ll
  llvm/test/CodeGen/Thumb2/mve-vpt-blocks.ll
  llvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76709.254716.patch
Type: text/x-patch
Size: 50460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/1f392d0a/attachment-0001.bin>


More information about the llvm-commits mailing list