[PATCH] D79341: [TTI] getScalarizationOverhead - use explicit VectorType operand

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 06:58:20 PDT 2020


samparker accepted this revision.
samparker added a comment.
This revision is now accepted and ready to land.

Apart from the dyn_cast nits, LGTM.



================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:591
+        VectorType *VecTy = nullptr;
         if (A->getType()->isVectorTy()) {
+          VecTy = cast<VectorType>(A->getType());
----------------
dyn_cast?


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1208
+        auto *RetVTy = cast<VectorType>(RetTy);
         if (ScalarizationCostPassed == std::numeric_limits<unsigned>::max())
+          ScalarizationCost = getScalarizationOverhead(RetVTy, true, false);
----------------
and here.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1217
         if (Ty->isVectorTy()) {
+          auto *VTy = cast<VectorType>(Ty);
           if (ScalarizationCostPassed == std::numeric_limits<unsigned>::max())
----------------
same.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1550
     if (RetTy->isVectorTy()) {
+      auto *RetVTy = cast<VectorType>(RetTy);
       unsigned ScalarizationCost =
----------------
here.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1567
         if (Tys[i]->isVectorTy()) {
+          auto *VTy = cast<VectorType>(Tys[i]);
           if (ScalarizationCostPassed == std::numeric_limits<unsigned>::max())
----------------
here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79341





More information about the llvm-commits mailing list