[llvm-branch-commits] [llvm] [LV][REVEC][AArch64] Proof of concept for re-vectorisation (PR #208213)

Gaƫtan Bossu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jul 30 07:09:00 PDT 2026


================
@@ -350,6 +355,12 @@ bool VFSelectionContext::isScalableVectorizationAllowed() {
   // Disable scalable vectorization if the loop contains any instructions
   // with element types not supported for scalable vectors.
   if (any_of(ElementTypesInLoop, [&](Type *Ty) {
+        if (auto *FVTy = dyn_cast<FixedVectorType>(Ty)) {
----------------
gbossu wrote:

Looking back at this, that looks more like a second legality check for REVEC, that should have already been done earlier at https://github.com/llvm/llvm-project/pull/208213/files#r3675725575. This lambda should probably be simplified to:
```
return !Ty->isVoidTy() && !TTI.isElementTypeLegalForScalableVector(Ty->getScalarType());
```

Now for `ElementTypesInLoop`, I think this should maybe just be `TypesInLoop`? These types get used by getSmallestAndWidestTypes/computeFeasibleMaxVF so I think it's important to retain the original types in the loop, not element types. Otherwise we'll vastly over-estimate the max feasible VF.

https://github.com/llvm/llvm-project/pull/208213


More information about the llvm-branch-commits mailing list