[PATCH] D78967: [SVE] Remove invalid usage of VectorType::getNumElements in Function
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 17:16:42 PDT 2020
ctetreau updated this revision to Diff 260500.
ctetreau marked an inline comment as done.
ctetreau added a comment.
address code review issues
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78967/new/
https://reviews.llvm.org/D78967
Files:
llvm/lib/IR/Function.cpp
Index: llvm/lib/IR/Function.cpp
===================================================================
--- llvm/lib/IR/Function.cpp
+++ llvm/lib/IR/Function.cpp
@@ -1074,8 +1074,8 @@
// Return the overloaded type (which determines the pointers address space)
return Tys[D.getOverloadArgNumber()];
case IITDescriptor::ScalableVecArgument: {
- auto *Ty = cast<VectorType>(DecodeFixedType(Infos, Tys, Context));
- return VectorType::get(Ty->getElementType(), {Ty->getNumElements(), true});
+ auto *Ty = cast<FixedVectorType>(DecodeFixedType(Infos, Tys, Context));
+ return ScalableVectorType::get(Ty->getElementType(), Ty->getNumElements());
}
}
llvm_unreachable("unhandled");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78967.260500.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/c7d3d4ba/attachment.bin>
More information about the llvm-commits
mailing list