diff options
author | Florian Hahn <flo@fhahn.com> | 2024-07-18 22:09:04 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2024-07-18 22:09:05 +0100 |
commit | 19c9a1c2fd2c3849439bca2ba5084dada4d1f47f (patch) | |
tree | 8c27e62d434e9a76f5824fab455e84b2d00a2bff /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | ded35c0c3ad371287e80872d6bd104ce3f7d2864 (diff) | |
download | llvm-19c9a1c2fd2c3849439bca2ba5084dada4d1f47f.zip llvm-19c9a1c2fd2c3849439bca2ba5084dada4d1f47f.tar.gz llvm-19c9a1c2fd2c3849439bca2ba5084dada4d1f47f.tar.bz2 |
[LAA] Include IndirectUnsafe in ::isPossiblyBackward.
Similarly to Unknown, IndirectUnsafe should also be considered possibly
backward, as it may be a backwards dependency e.g. via loading
different base pointers.
This also brings isPossiblyBackward in line with
Dependence::isSafeForVectorization. At the moment this can't be tested,
as it is not possible to write a test with an AddRec that is based on a
loop varying value. But this may change in the future and may cause
mis-compiles in the future.
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 91994f3..84214c4 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1730,7 +1730,7 @@ bool MemoryDepChecker::Dependence::isBackward() const { } bool MemoryDepChecker::Dependence::isPossiblyBackward() const { - return isBackward() || Type == Unknown; + return isBackward() || Type == Unknown || Type == IndirectUnsafe; } bool MemoryDepChecker::Dependence::isForward() const { |