[PATCH] D102253: [LV] Prevent vectorization with unsupported element types.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 02:50:11 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5685
+      auto *Ty = I.getType();
+      if (!Ty->isVoidTy() && !Ty->isIntegerTy(1) &&
+          !TTI.isElementTypeLegalForScalableVector(Ty)) {
----------------
Hi @kmclaughlin I tried out this patch and found there is a case that's missing, namely where the instruction is a `StoreInst`, which itself has `void` as its type, but then stores a loop invariant i128/f128 value to  a variant address.

Also, looking at this condition again, why is IntegerTy(1) handled differently here? For SVE we have predicate vectors, so it should be covered by isElementTypeLegalForScalableVector?


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

https://reviews.llvm.org/D102253



More information about the llvm-commits mailing list