[PATCH] D79807: [SVE] Remove usages of VectorType::getNumElements() from AMDGPU

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 15:05:06 PDT 2020


ctetreau marked an inline comment as done.
ctetreau added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp:1129
     Type *nTy = nTyS;
-    if (const VectorType *vTy = dyn_cast<VectorType>(rTy))
-      nTy = VectorType::get(nTyS, vTy->getNumElements());
+    if (const auto *vTy = dyn_cast<FixedVectorType>(rTy))
+      nTy = FixedVectorType::get(nTyS, vTy);
----------------
efriedma wrote:
> Unnecessary "const".
It was there before and it's not hurting anything. I can remove it if you really want me to.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79807





More information about the llvm-commits mailing list