[llvm] 2a77d1d - [SVE] Remove usages of VectorType::getNumElements() from Hexagon

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 17:13:26 PDT 2020


Author: Christopher Tetreault
Date: 2020-05-13T17:13:12-07:00
New Revision: 2a77d1d0ed1fd5756da4b0695ab1208f2fbea988

URL: https://github.com/llvm/llvm-project/commit/2a77d1d0ed1fd5756da4b0695ab1208f2fbea988
DIFF: https://github.com/llvm/llvm-project/commit/2a77d1d0ed1fd5756da4b0695ab1208f2fbea988.diff

LOG: [SVE] Remove usages of VectorType::getNumElements() from Hexagon

Reviewers: efriedma, kmclaughlin, sdesmalen, kparzysz

Reviewed By: kparzysz

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79819

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp b/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
index 99845ae7ca84..4952326fab76 100644
--- a/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
@@ -60,7 +60,7 @@ bool HexagonTTIImpl::isTypeForHVX(Type *VecTy) const {
 }
 
 unsigned HexagonTTIImpl::getTypeNumElements(Type *Ty) const {
-  if (auto *VTy = dyn_cast<VectorType>(Ty))
+  if (auto *VTy = dyn_cast<FixedVectorType>(Ty))
     return VTy->getNumElements();
   assert((Ty->isIntegerTy() || Ty->isFloatingPointTy()) &&
          "Expecting scalar type");


        


More information about the llvm-commits mailing list