[PATCH] D85410: [ARM][MVE] Allow loops containing strides != 1 to be tail predicated with gather/scatters enabled
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 06:55:42 PDT 2020
dmgreen 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()
----------------
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.
================
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());
----------------
Perhaps
if (auto AR = dyn_cast<SCEVAddRecExpr>(PtrScev)) {
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85410/new/
https://reviews.llvm.org/D85410
More information about the llvm-commits
mailing list