[llvm] [ARM] Don't block tail-predication from unrelated VPT blocks. (PR #94239)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 10:46:01 PDT 2024


================
@@ -275,6 +281,16 @@ namespace {
       if (VPT->getOpcode() == ARM::MVE_VPST)
         return false;
 
+      // If the VPT block does not define something that is an "output", then the
+      // tail-predicated version will just perform a subset of the original vpt
+      // block, where the last lanes should not be used.
+      if (isVPTOpcode(VPT->getOpcode()) &&
----------------
davemgreen wrote:

Hi thanks for taking a look. Its a good question - I think the best answer I have is that haven't been able to break it. I wrote a fuzzer of sorts to put random intrinsics into a loop with some vctp's in a way that could detect problems in tail predication. It didn't find any problems with this (just a issue with else-predicated vctp's) but you know how fuzzers are - they might just not be testing the right code or I might not be being imaginative enough.

Loads were not my motivating case though, so I can exclude them. They just didn't fit into my "outputs" view of what to exclude, and I was trying to make sure we didn't end up tail-predicating less.

https://github.com/llvm/llvm-project/pull/94239


More information about the llvm-commits mailing list