diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp --- a/openmp/libomptarget/src/omptarget.cpp +++ b/openmp/libomptarget/src/omptarget.cpp @@ -1441,9 +1441,6 @@ } } - // Get loop trip count - uint64_t LoopTripCount = getLoopTripCount(DeviceId); - // Launch device execution. void *TgtEntryPtr = TargetTable->EntriesBegin[TM->Index].addr; DP("Launching target execution %s with pointer " DPxMOD " (index=%d).\n", @@ -1455,7 +1452,7 @@ if (IsTeamConstruct) Ret = Device.runTeamRegion(TgtEntryPtr, &TgtArgs[0], &TgtOffsets[0], TgtArgs.size(), TeamNum, ThreadLimit, - LoopTripCount, AsyncInfo); + getLoopTripCount(DeviceId), AsyncInfo); else Ret = Device.runRegion(TgtEntryPtr, &TgtArgs[0], &TgtOffsets[0], TgtArgs.size(), AsyncInfo);