diff options
author | Florian Hahn <flo@fhahn.com> | 2022-01-04 14:34:38 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-01-04 15:20:35 +0000 |
commit | d8276208be763ba5b70e9b422034e77764a8649f (patch) | |
tree | 96009ee5eeb357743a212f92c7606d9dfac9ee5b /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 10bb837feb22ad70dc4acc3d2cdb5be7f45d1c21 (diff) | |
download | llvm-d8276208be763ba5b70e9b422034e77764a8649f.zip llvm-d8276208be763ba5b70e9b422034e77764a8649f.tar.gz llvm-d8276208be763ba5b70e9b422034e77764a8649f.tar.bz2 |
[LAA] Remove overeager assertion for aggregate types.
0a00d64 turned an early exit here into an assertion, but the assertion
can be triggered, as PR52920 shows.
The later code is agnostic to the accessed type, so just drop the
assert. The patch also adds tests for LAA directly and
loop-load-elimination to show the behavior is sane.
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 6444518..b8b1b5a 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1055,7 +1055,6 @@ int64_t llvm::getPtrStride(PredicatedScalarEvolution &PSE, Type *AccessTy, bool ShouldCheckWrap) { Type *Ty = Ptr->getType(); assert(Ty->isPointerTy() && "Unexpected non-ptr"); - assert(!AccessTy->isAggregateType() && "Bad stride - Not a pointer to a scalar type"); if (isa<ScalableVectorType>(AccessTy)) { LLVM_DEBUG(dbgs() << "LAA: Bad stride - Scalable object: " << *AccessTy |