[PATCH] D69845: [ARM][MVE] canTailPredicateLoop

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 07:14:03 PST 2019


samparker added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1009
+
+  if (isa<TruncInst>(&I) ||
+      isa<SExtInst>(&I)  ||
----------------
... check uses/users.


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1018
+
+static bool consecutiveLoadStores(SmallVector<Instruction *, 16> &LoadStores,
+                                  ScalarEvolution &SE,
----------------
SmallVectorImpl<Instruction*>


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1026
+    Value *Ptr = isa<LoadInst>(I) ? I->getOperand(0) : I->getOperand(1);
+    int64_t Stride = getPtrStride(PSE, Ptr, L);
+    Strides.insert(Stride);
----------------
if (Stride != 1) return false


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1051
+    for (Instruction &I : BB->instructionsWithoutDebug()) {
+      if (dyn_cast<PHINode>(&I))
+        continue;
----------------
isa


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1070
+      // Collect all loads and stores
+      if (isa<StoreInst>(I) || isa<LoadInst>(I))
+        LoadStores.push_back(&I);
----------------
Makes sense to just check the stride here and then we can exit early.


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

https://reviews.llvm.org/D69845





More information about the llvm-commits mailing list