Skip to content

Commit 55a4e7e

Browse files
fhahnyuxuanchen1997
authored andcommitted
[LAA] Include IndirectUnsafe in ::isPossiblyBackward.
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251685
1 parent 24e4aa3 commit 55a4e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ bool MemoryDepChecker::Dependence::isBackward() const {
17301730
}
17311731

17321732
bool MemoryDepChecker::Dependence::isPossiblyBackward() const {
1733-
return isBackward() || Type == Unknown;
1733+
return isBackward() || Type == Unknown || Type == IndirectUnsafe;
17341734
}
17351735

17361736
bool MemoryDepChecker::Dependence::isForward() const {

0 commit comments

Comments
 (0)