[PATCH] D77257: Clean up usages of asserting vector getters in Type

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 08:38:51 PDT 2020


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

LGTM!



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5830
         BuiltinID == NEON::BI__builtin_neon_vqrdmulhq_lane_v)
-      RTy = llvm::VectorType::get(Ty->getVectorElementType(),
-                                  Ty->getVectorNumElements() * 2);
+      RTy = llvm::VectorType::get(cast<llvm::VectorType>(Ty)->getElementType(),
+                                  cast<llvm::VectorType>(Ty)->getNumElements() *
----------------
nit: Can you pull this into a separate variable so you only have to cast once?
(possibly RTy can be re-used for this)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77257





More information about the cfe-commits mailing list