[PATCH] D82219: [SVE] Remove calls to VectorType::getNumElements from IPO
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 14:08:08 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3d123e17d84e: [SVE] Remove calls to VectorType::getNumElements from IPO (authored by ctetreau).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82219/new/
https://reviews.llvm.org/D82219
Files:
llvm/lib/Transforms/IPO/GlobalOpt.cpp
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -443,7 +443,7 @@
static uint64_t GetSRASequentialNumElements(Type *T) {
if (ArrayType *AT = dyn_cast<ArrayType>(T))
return AT->getNumElements();
- return cast<VectorType>(T)->getNumElements();
+ return cast<FixedVectorType>(T)->getNumElements();
}
static Type *GetSRASequentialElementType(Type *T) {
if (ArrayType *AT = dyn_cast<ArrayType>(T))
@@ -2570,7 +2570,7 @@
if (ArrayType *ATy = dyn_cast<ArrayType>(Init->getType()))
NumElts = ATy->getNumElements();
else
- NumElts = cast<VectorType>(Init->getType())->getNumElements();
+ NumElts = cast<FixedVectorType>(Init->getType())->getNumElements();
// Break up the array into elements.
for (uint64_t i = 0, e = NumElts; i != e; ++i)
@@ -2706,7 +2706,7 @@
else if (auto *ATy = dyn_cast<ArrayType>(Ty))
NumElts = ATy->getNumElements();
else
- NumElts = cast<VectorType>(Ty)->getNumElements();
+ NumElts = cast<FixedVectorType>(Ty)->getNumElements();
for (unsigned i = 0, e = NumElts; i != e; ++i)
Elts.push_back(Init->getAggregateElement(i));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82219.273154.patch
Type: text/x-patch
Size: 1291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200624/ba927459/attachment.bin>
More information about the llvm-commits
mailing list