diff options
Diffstat (limited to 'llvm/lib/Analysis/DependenceAnalysis.cpp')
| -rw-r--r-- | llvm/lib/Analysis/DependenceAnalysis.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index 3dcfcb839ad..3374b48c141 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -3651,6 +3651,8 @@ DependenceAnalysis::depends(Instruction *Src, Instruction *Dst, DEBUG(dbgs() << " updating\n"); for (int SJ = ConstrainedLevels.find_first(); SJ >= 0; SJ = ConstrainedLevels.find_next(SJ)) { + if (SJ > (int)CommonLevels) + break; updateDirection(Result.DV[SJ - 1], Constraints[SJ]); if (Result.DV[SJ - 1].Direction == Dependence::DVEntry::NONE) return nullptr; |

