summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemDerefPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/MemDerefPrinter.cpp')
-rw-r--r--llvm/lib/Analysis/MemDerefPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemDerefPrinter.cpp b/llvm/lib/Analysis/MemDerefPrinter.cpp
index 5f95a18b8a1..77ebf89d9a0 100644
--- a/llvm/lib/Analysis/MemDerefPrinter.cpp
+++ b/llvm/lib/Analysis/MemDerefPrinter.cpp
@@ -53,9 +53,10 @@ bool MemDerefPrinter::runOnFunction(Function &F) {
for (auto &I: instructions(F)) {
if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
Value *PO = LI->getPointerOperand();
- if (isDereferenceablePointer(PO, DL))
+ if (isDereferenceablePointer(PO, LI->getType(), DL))
Deref.push_back(PO);
- if (isDereferenceableAndAlignedPointer(PO, LI->getAlignment(), DL))
+ if (isDereferenceableAndAlignedPointer(PO, LI->getType(),
+ LI->getAlignment(), DL))
DerefAndAligned.insert(PO);
}
}
OpenPOWER on IntegriCloud