[PATCH] D85410: [ARM][MVE] Allow loops containing strides != 1 to be tail predicated with gather/scatters enabled
Anna Welker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 02:45:30 PDT 2020
anwel added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1631
continue;
- }
- if (Stride != NextStride) {
- LLVM_DEBUG(dbgs() << "Different strides found, can't "
- "tail-predicate\n.");
+ } else if (NextStride == 2) {
+ LLVM_DEBUG(dbgs()
----------------
dmgreen wrote:
> Can you change this condition to something like
> if (NextStride == -1 || (NextStride == 2 && MVEMaxSupportedInterleaveFactor >= 2) || (NextStride == 4 && MVEMaxSupportedInterleaveFactor >= 4))
> That should hopefully make it more futureproof, and specifically rule out reverse loads even if the vectorizer changes to support them.
Of course I can, that sounds like a good idea.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1644-1645
+ replaceSymbolicStrideSCEV(PSE, llvm::ValueToValueMap(), Ptr);
+ const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(PtrScev);
+ if (AR) {
+ const SCEV *Step = AR->getStepRecurrence(*PSE.getSE());
----------------
dmgreen wrote:
> Perhaps
> if (auto AR = dyn_cast<SCEVAddRecExpr>(PtrScev)) {
Sure
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85410/new/
https://reviews.llvm.org/D85410
More information about the llvm-commits
mailing list