[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
Thu Jun 4 12:45:49 PDT 2020
efriedma added a comment.
I'd like to see a few negative testcases, where we can't transform the llvm.get.active.lane.mask.
================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:352
+ Value *TripCount, FixedVectorType *VecTy) {
+ int VectorWidth = VecTy->getElementCount().Min;
+ auto *BackedgeTakenCount = ActiveLaneMask->getOperand(1);
----------------
getNumElements() is fine on a FixedVectorType.
================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:384
+ // Evaluate this and bail if it can be negative.
+ if (llvm::isKnownNegativeInLoop(ECMinusTC, L, *SE)) {
+ LLVM_DEBUG(dbgs() << "ARM TP: overflow in element count decrement\n");
----------------
!isKnownNonNegative?
================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:403
+ // If this phi is invariant, it's not a phi in this loop.
+ if (SE->isLoopInvariant(IVExpr, L)) {
+ LLVM_DEBUG(dbgs() << "ARM TP: phi is not incremented in this loop\n");
----------------
I was expecting something more like `IVExpr->getLoop() == L`. L might not be the innermost loop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79175/new/
https://reviews.llvm.org/D79175
More information about the llvm-commits
mailing list