[OpenMP][libomptarget] Fix master warp check

Summary: The check for the master warp must take into consideration the actual number of warps: the master warp is equal to the last active warp not necessarily WARPSIZE - 1.

Reviewers: grokos, carlo.bertolli, ABataev, caomhin

Reviewed By: grokos

Subscribers: guansong, openmp-commits

Differential Revision: https://reviews.llvm.org/D44537

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@328146 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed