diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-09-26 21:21:13 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-09-26 21:21:54 +0200 |
commit | 7a855596c3a29ba7a9b0cc9bcc820f7f78d07afe (patch) | |
tree | a9a705eceb09719ece76601797745719ea1fbc5b /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | c0eff50fc5a48990ad9ebfcb7e81c6ab6fea79c5 (diff) | |
download | llvm-7a855596c3a29ba7a9b0cc9bcc820f7f78d07afe.zip llvm-7a855596c3a29ba7a9b0cc9bcc820f7f78d07afe.tar.gz llvm-7a855596c3a29ba7a9b0cc9bcc820f7f78d07afe.tar.bz2 |
[BasicAA] Don't check whether GEP is sized (NFC)
GEPs are required to have sized source element type, so we can
just assert that here.
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 8e53e7c..911ea63 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -535,11 +535,7 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL, else if (!GEPOp->isInBounds()) Decomposed.InBounds = false; - // Don't attempt to analyze GEPs over unsized objects. - if (!GEPOp->getSourceElementType()->isSized()) { - Decomposed.Base = V; - return Decomposed; - } + assert(GEPOp->getSourceElementType()->isSized() && "GEP must be sized"); // Don't attempt to analyze GEPs if index scale is not a compile-time // constant. |