[PATCH] D85737: ARM][MVE] tail-predication: overflow checks for backedge taken count

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 13:53:13 PDT 2020


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

It's nice that we have some utility that computes what you need, even if it's not the obvious one.



================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:374
   auto *BTC = SE->getSCEV(BackedgeTakenCount);
+  auto *MaxBTC = SE->getConstantMaxBackedgeTakenCount(L);
+
----------------
I'm forgetting, do we have a check somewhere that BackedgeTakenCount is actually the backedge-taken count of the loop?


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:383
+  APInt MaxInt = APInt(BTC->getType()->getScalarSizeInBits(), ~0);
+  if (dyn_cast<SCEVConstant>(MaxBTC)->getAPInt().eq(MaxInt) &&
       !ForceTailPredication) {
----------------
cast<>.


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

https://reviews.llvm.org/D85737



More information about the llvm-commits mailing list