[OPENMP][NVPTX] Fix emission of __kmpc_global_thread_num() for non-SPMD
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 5 Oct 2018 15:27:47 +0000 (15:27 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 5 Oct 2018 15:27:47 +0000 (15:27 +0000)
commit6bc2732f71e48c2d7a1d6182b6fc2437f533616d
tree779e24f9f0767a948509531cf3fc67b39e5dd71e
parentfd006c44eeffe1f018f7fda13eacb67a6606ec9c
[OPENMP][NVPTX] Fix emission of __kmpc_global_thread_num() for non-SPMD
mode.

__kmpc_global_thread_num() should be called before initialization of the
runtime.

llvm-svn: 343857
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
clang/test/OpenMP/nvptx_teams_codegen.cpp