aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/Loads.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-11-16 11:05:18 -0800
committerArthur Eubanks <aeubanks@google.com>2021-11-16 11:17:57 -0800
commitc95a9f46c9cff8377232466e9bb6f097893fc860 (patch)
treee3a9f3fae7c6bf1394ea6762f6368a86e41b5752 /llvm/lib/Analysis/Loads.cpp
parent1ff87ec235b8981c15c9956bd71cd74a4bff9557 (diff)
downloadllvm-c95a9f46c9cff8377232466e9bb6f097893fc860.zip
llvm-c95a9f46c9cff8377232466e9bb6f097893fc860.tar.gz
llvm-c95a9f46c9cff8377232466e9bb6f097893fc860.tar.bz2
[Loads] Handle addrspacecast constant expressions when determining dereferenceability
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D114015
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r--llvm/lib/Analysis/Loads.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 1882e31..0fbf1db 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -147,7 +147,7 @@ static bool isDereferenceableAndAlignedPointer(
Alignment, Size, DL, CtxI, DT,
TLI, Visited, MaxDepth);
- if (const AddrSpaceCastInst *ASC = dyn_cast<AddrSpaceCastInst>(V))
+ if (const AddrSpaceCastOperator *ASC = dyn_cast<AddrSpaceCastOperator>(V))
return isDereferenceableAndAlignedPointer(ASC->getOperand(0), Alignment,
Size, DL, CtxI, DT, TLI,
Visited, MaxDepth);