[PATCH] D86727: [SVE] Remove bad call to VectorType::getNumElements() from HeapProfiler
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 11:10:34 PDT 2020
ctetreau created this revision.
Herald added subscribers: llvm-commits, psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.
ctetreau requested review of this revision.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86727
Files:
llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
Index: llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
+++ llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
@@ -414,8 +414,8 @@
Value *Addr, unsigned Alignment,
uint32_t TypeSize,
bool IsWrite) {
- auto *VTy =
- cast<VectorType>(cast<PointerType>(Addr->getType())->getElementType());
+ auto *VTy = cast<FixedVectorType>(
+ cast<PointerType>(Addr->getType())->getElementType());
uint64_t ElemTypeSize = DL.getTypeStoreSizeInBits(VTy->getScalarType());
unsigned Num = VTy->getNumElements();
auto *Zero = ConstantInt::get(IntptrTy, 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86727.288394.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/fa2718ca/attachment.bin>
More information about the llvm-commits
mailing list