[PATCH] D114155: [LoopAccessAnalysis][SVE] Bail out for scalable vectors

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 23 09:12:10 PST 2021


peterwaller-arm marked an inline comment as done.
peterwaller-arm added inline comments.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:1105-1108
+  if (AllocSize.isScalable()) {
+    LLVM_DEBUG(dbgs() << "LAA: Unsupported stride - scalable object: "
+                      << *AccessTy << "\n");
+    return 0;
----------------
paulwalker-arm wrote:
> At the top of this function I can see
> ```
>   if (AccessTy->isAggregateType()) {
>     LLVM_DEBUG(dbgs() << "LAA: Bad stride - Not a pointer to a scalar type"
>                       << *Ptr << "\n");
>     return 0;
>   }
> ```
> So my question is why not just add a check immediate after this for `isa<ScalableVector>(AccessTy)`?
My thinking was to plant the bailout logic near the site that would need to be updated should this get extended, but your suggestion makes sense to me, so done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114155



More information about the llvm-commits mailing list