diff options
| author | Adam Nemet <anemet@apple.com> | 2015-02-26 17:58:48 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2015-02-26 17:58:48 +0000 |
| commit | 9cc0c3999d20c4a8d2c8ac343240c29155f35214 (patch) | |
| tree | 3eb44f1fd56d678f4cf550bf62f93377cfef350f /llvm/lib/Analysis | |
| parent | 832a28c945577eb6807e57ba647c2f37baff6aaa (diff) | |
| download | bcm5719-llvm-9cc0c3999d20c4a8d2c8ac343240c29155f35214.tar.gz bcm5719-llvm-9cc0c3999d20c4a8d2c8ac343240c29155f35214.zip | |
[LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types
Noticed this while generalizing the code for loop distribution.
I confirmed with Arnold that this was indeed a bug and managed to create
a testcase.
llvm-svn: 230647
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 1a0bf48dcd0..7bedd40432b 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -794,11 +794,10 @@ bool MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx, assert(Val.isStrictlyPositive() && "Expect a positive value"); - // Positive distance bigger than max vectorization factor. if (ATy != BTy) { DEBUG(dbgs() << "LAA: ReadWrite-Write positive dependency with different types\n"); - return false; + return true; } unsigned Distance = (unsigned) Val.getZExtValue(); @@ -820,6 +819,7 @@ bool MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx, return true; } + // Positive distance bigger than max vectorization factor. MaxSafeDepDistBytes = Distance < MaxSafeDepDistBytes ? Distance : MaxSafeDepDistBytes; |

