[PATCH] D88086: [ARM][MVE] tail-predication: checks for the elementcount, cont'd

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 11:37:19 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:459
+    //
+    if (!SE->hasOperand(SE->getBackedgeTakenCount(L), Ceil)) {
+      LLVM_DEBUG(dbgs() << "ARM TP: possible overflow in sub expression.\n");
----------------
I'm not really comfortable using hasOperand here.

Can we actually do something like `SE->getBackedgeTakenCount(L) == S->getUDiv(SE->getAdd(SE->getMul(Ceil, VectorWidth), SE->getNeg(VectorWidth)), VectorWidth)`?  Or is that not reliable enough?


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:507
     return false;
   }
   auto StepValue = Step->getValue()->getSExtValue();
----------------
efriedma wrote:
> Do we need to check the first operand of the AddRec is zero?
Any further thought on this?


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

https://reviews.llvm.org/D88086



More information about the llvm-commits mailing list