[PATCH] D102515: [CostModel] Return an invalid cost for memory ops with unsupported types

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 01:42:40 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:2261
   }
+  bool isLegalToVectorizeElementType(Type *Ty, bool VectorIsScalable) const override {
+    return Impl.isLegalToVectorizeElementType(Ty, VectorIsScalable);
----------------
nit: Could you clean up the clang-format warnings?


================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:998
       if (VT.getVectorElementCount() == ElementCount::getScalable(1))
-        report_fatal_error("Cannot legalize this scalable vector");
+        return LegalizeKind(TypeScalarizeScalableVector, EltVT);
       return LegalizeKind(TypeSplitVector,
----------------
Hi @kmclaughlin is it possible to add a test for this? For example, just another test for <vscale x 1 x i128>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102515



More information about the llvm-commits mailing list