[llvm-branch-commits] [llvm] [LV][REVEC] Initial support for re-vectorisation (PR #208213)

Gaƫtan Bossu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 17 03:41:37 PDT 2026


================
@@ -991,7 +1014,9 @@ bool LoopVectorizationLegality::canVectorizeInstr(Instruction &I) {
   // Check that the stored type is vectorizable.
   if (auto *ST = dyn_cast<StoreInst>(&I)) {
     Type *T = ST->getValueOperand()->getType();
-    if (!VectorType::isValidElementType(T)) {
+    bool CanWidenStoreType = VectorType::isValidElementType(T) ||
+                             (isa<FixedVectorType>(T) && VectorizeVectorLoops);
----------------
gbossu wrote:

Tbh I'd rather have a single place that checks instruction types. It would be fine to turn this check into a simpler `VectorType::isValidElementType(T) || isa<FixedVectorType>(T)`, followed by a later broad check whether the loop contains vector types, but I don't really see this as an improvement. Happy to hear other opinions though :)

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


More information about the llvm-branch-commits mailing list