llvm-project/llvm/test/Transforms/LoopLoadElim
Florian Hahn 2062b3707c [LAA] Avoid adding pointers to the checks if they are not needed.
Currently we skip alias sets with only reads or a single write and no
reads, but still add the pointers to the list of pointers in RtCheck.

This can lead to cases where we try to access a pointer that does not
exist when grouping checks.  In most cases, the way we access
PositionMap masked that, as the value would default to index 0.

But in the example in PR46854 it causes a crash.

This patch updates the logic to avoid adding pointers for alias sets
that do not need any checks. It makes things slightly more verbose, by
first checking the numbers of reads/writes and bailing out early if we don't
need checks for the alias set.

I think this makes the logic a bit simpler to follow.

Reviewed By: anemet

Differential Revision: https://reviews.llvm.org/D84608
2020-07-30 19:21:14 +01:00
..
backward.ll
cond-load.ll
convergent.ll
def-store-before-load.ll
forward.ll
loop-simplify-dep.ll
memcheck.ll
multiple-stores-same-block.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
new-pm-preheader-problem.ll
non-consecutive.ll
opt-size.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
pr46854-adress-spaces.ll [LAA] Avoid adding pointers to the checks if they are not needed. 2020-07-30 19:21:14 +01:00
symbolic-stride.ll
type-mismatch.ll
unknown-dep.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00