[LAA] Remove overeager assertion for aggregate types.
authorFlorian Hahn <flo@fhahn.com>
Tue, 4 Jan 2022 14:34:38 +0000 (14:34 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 4 Jan 2022 15:20:35 +0000 (15:20 +0000)
commitd8276208be763ba5b70e9b422034e77764a8649f
tree96009ee5eeb357743a212f92c7606d9dfac9ee5b
parent10bb837feb22ad70dc4acc3d2cdb5be7f45d1c21
[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.
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/test/Analysis/LoopAccessAnalysis/symbolic-stride.ll [new file with mode: 0644]
llvm/test/Transforms/LoopLoadElim/symbolic-stride.ll