From 3d123e17d84ea4062a10d6b2ef0426fdb7c90158 Mon Sep 17 00:00:00 2001 From: Christopher Tetreault Date: Wed, 24 Jun 2020 13:27:38 -0700 Subject: [PATCH] [SVE] Remove calls to VectorType::getNumElements from IPO Reviewers: efriedma, jdoerfert, sdesmalen, kmclaughlin Reviewed By: efriedma, jdoerfert Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82219 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 47ac7eb..116e68b 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -443,7 +443,7 @@ static bool IsSRASequential(Type *T) { static uint64_t GetSRASequentialNumElements(Type *T) { if (ArrayType *AT = dyn_cast(T)) return AT->getNumElements(); - return cast(T)->getNumElements(); + return cast(T)->getNumElements(); } static Type *GetSRASequentialElementType(Type *T) { if (ArrayType *AT = dyn_cast(T)) @@ -2570,7 +2570,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val, if (ArrayType *ATy = dyn_cast(Init->getType())) NumElts = ATy->getNumElements(); else - NumElts = cast(Init->getType())->getNumElements(); + NumElts = cast(Init->getType())->getNumElements(); // Break up the array into elements. for (uint64_t i = 0, e = NumElts; i != e; ++i) @@ -2706,7 +2706,7 @@ static void BatchCommitValueTo(const DenseMap &Mem) { else if (auto *ATy = dyn_cast(Ty)) NumElts = ATy->getNumElements(); else - NumElts = cast(Ty)->getNumElements(); + NumElts = cast(Ty)->getNumElements(); for (unsigned i = 0, e = NumElts; i != e; ++i) Elts.push_back(Init->getAggregateElement(i)); } -- 2.7.4