[PATCH] D73198: [ARM][MVE] Tail-predication: support constant trip count
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 07:07:14 PST 2020
samparker added inline comments.
================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:402
+//
+static Value *ComputeConstElements(Instruction *Predicate, ConstantInt *TC,
+ ConstantInt *VF) {
----------------
Looks like this could just be in MatchICmpConstVec? Save us from calling MatchICmpConstVec twice and reduces the logic involved.
================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:639
auto *Predicate = dyn_cast<Instruction>(I->getArgOperand(PredOp));
if (!Predicate || Predicates.count(Predicate))
continue;
----------------
With those functions combined, we could then just pass the constant value to isTailPredicate. So something like:
```
Value *NumElements = nullptr
if (!MatchICmpConstVec(Predicate, NumElements) && !ComputeElements(Predicate))
continue;
```
This would allow our logic to diverge early, but maybe only once, instead of weaving between the two in the other two functions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73198/new/
https://reviews.llvm.org/D73198
More information about the llvm-commits
mailing list