[llvm] 035833a - [SVE] Remove bad call to VectorType::getNumElements() from HeapProfiler

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 12:16:14 PDT 2020


Author: Christopher Tetreault
Date: 2020-08-27T12:16:00-07:00
New Revision: 035833ae42aa6c597f28b6e0e1118508e26f175c

URL: https://github.com/llvm/llvm-project/commit/035833ae42aa6c597f28b6e0e1118508e26f175c
DIFF: https://github.com/llvm/llvm-project/commit/035833ae42aa6c597f28b6e0e1118508e26f175c.diff

LOG: [SVE] Remove bad call to VectorType::getNumElements() from HeapProfiler

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D86727

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp b/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
index 16abe3a3de11..6372dfded82a 100644
--- a/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
@@ -414,8 +414,8 @@ void HeapProfiler::instrumentMaskedLoadOrStore(const DataLayout &DL,
                                                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);


        


More information about the llvm-commits mailing list