diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-09-11 17:16:26 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-09-11 17:16:26 +0000 |
commit | 365cc0fa71bed0a1df7ecdf1702d6ae5be72a909 (patch) | |
tree | d91d8e9192867f796952f051ab56750ba62836a7 /openmp/libomptarget | |
parent | 75e7df2d2389d7f69048f747f21c46eba1fb4448 (diff) |
[OPENMP]Increment iterator when the loop is continued.
Summary:
Missed operation of the incrementing iterator when required just to
continue execution.
Reviewers: kkwli0, gtbercea, grokos
Subscribers: guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D51937
Diffstat (limited to 'openmp/libomptarget')
-rw-r--r-- | openmp/libomptarget/src/omptarget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp index 233de9e1424..fd2268860f2 100644 --- a/openmp/libomptarget/src/omptarget.cpp +++ b/openmp/libomptarget/src/omptarget.cpp @@ -423,8 +423,10 @@ int target_data_end(DeviceTy &Device, int32_t arg_num, void **args_base, // An STL map is sorted on its keys; use this property // to quickly determine when to break out of the loop. - if ((uintptr_t) ShadowHstPtrAddr < lb) + if ((uintptr_t) ShadowHstPtrAddr < lb) { + ++it; continue; + } if ((uintptr_t) ShadowHstPtrAddr >= ub) break; |