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

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 12:12:13 PDT 2020


SjoerdMeijer 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");
----------------
efriedma wrote:
> 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?
Yeah, I was trying to avoid that bit of pattern matching (and hasOperand was so convenient), but will give that a try tomorrow.


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


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

https://reviews.llvm.org/D88086



More information about the llvm-commits mailing list