aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2024-07-18 22:09:04 +0100
committerFlorian Hahn <flo@fhahn.com>2024-07-18 22:09:05 +0100
commit19c9a1c2fd2c3849439bca2ba5084dada4d1f47f (patch)
tree8c27e62d434e9a76f5824fab455e84b2d00a2bff /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parentded35c0c3ad371287e80872d6bd104ce3f7d2864 (diff)
downloadllvm-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.cpp2
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 {