[PATCH] D79175: [ARM][MVE] Tail-Predication: use @llvm.get.active.lane.mask to get the BTC

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 19:10:44 PDT 2020


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

I don't think the overflow check (step 2.2) in IsSafeActiveMask is right. The way it's comparing ranges doesn't seem sound: the "range" is conservative, so it's possible the actual value of the trip count at runtime is only one of the values in the range.  Comparing the overlap on the ranges produces a result that doesn't really correspond to what you're looking for. Not sure if I'm explaining that clearly.

If it's really too hard to come up with the relevant proofs, we might want to revise the definition of llvm.get.active.lane.mask.  I'm not sure what the revision looks like.  We could say that it never produces an all-false vector; instead, it produces poison in that case. Or we could change the arguments somehow to make them easier to reason about.

That said, I'm okay with committing this as-is with the understanding that the pass will stay disabled until we resolve the issues with the overflow check.  It looks substantially like what I expect the final form to be.  LGTM


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

https://reviews.llvm.org/D79175





More information about the llvm-commits mailing list