[PATCH] D82208: [SVE] Remove calls to VectorType::getNumElements from AsmParser
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 14:33:30 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG433c9adf7b2b: [SVE] Remove calls to VectorType::getNumElements from AsmParser (authored by ctetreau).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82208/new/
https://reviews.llvm.org/D82208
Files:
llvm/lib/AsmParser/LLParser.cpp
Index: llvm/lib/AsmParser/LLParser.cpp
===================================================================
--- llvm/lib/AsmParser/LLParser.cpp
+++ llvm/lib/AsmParser/LLParser.cpp
@@ -3650,9 +3650,10 @@
ExplicitTypeLoc,
"explicit pointee type doesn't match operand's pointee type");
- unsigned GEPWidth = BaseType->isVectorTy()
- ? cast<VectorType>(BaseType)->getNumElements()
- : 0;
+ unsigned GEPWidth =
+ BaseType->isVectorTy()
+ ? cast<FixedVectorType>(BaseType)->getNumElements()
+ : 0;
ArrayRef<Constant *> Indices(Elts.begin() + 1, Elts.end());
for (Constant *Val : Indices) {
@@ -3660,7 +3661,7 @@
if (!ValTy->isIntOrIntVectorTy())
return Error(ID.Loc, "getelementptr index must be an integer");
if (auto *ValVTy = dyn_cast<VectorType>(ValTy)) {
- unsigned ValNumEl = ValVTy->getNumElements();
+ unsigned ValNumEl = cast<FixedVectorType>(ValVTy)->getNumElements();
if (GEPWidth && (ValNumEl != GEPWidth))
return Error(
ID.Loc,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82208.272835.patch
Type: text/x-patch
Size: 1169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200623/00f01603/attachment.bin>
More information about the llvm-commits
mailing list