[PATCH] D128073: [SROA] Try harder to find a vector promotion viable type when rewriting

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 09:31:10 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:4266-4267
+  if (!SliceTy ||
+      (SliceTy->isVectorTy() &&
+       !CheckVectorTypeForPromotion(P, dyn_cast<VectorType>(SliceTy), DL)))
     if (Type *TypePartitionTy = getTypePartition(DL, AI.getAllocatedType(),
----------------
Using isVectorTy + VectorType is ugly. Use dyn_cast for the type check too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128073



More information about the llvm-commits mailing list