Skip to content

Commit b4d27ba

Browse files
committed
fix bug in insertSort
1 parent 820f3c9 commit b4d27ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/MemoryDependenceAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache,
999999
NonLocalDepEntry Val = Cache.back();
10001000
Cache.pop_back();
10011001
MemoryDependenceResults::NonLocalDepInfo::iterator Entry =
1002-
llvm::upper_bound(Cache, Val);
1002+
std::upper_bound(Cache.begin(), Cache.end() - s + 1, Val);
10031003
Cache.insert(Entry, Val);
10041004
s--;
10051005
}

0 commit comments

Comments
 (0)