diff options
| author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-01-07 16:54:36 +0000 |
|---|---|---|
| committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-01-07 16:54:36 +0000 |
| commit | 3ffca790f6003b8c70a5758219a9f08092913e63 (patch) | |
| tree | 381c8d6bbe02dbcab620a1cd6abdfe29a68fdaa3 /openmp/runtime/src/kmp_csupport.cpp | |
| parent | 672f7adce5543e2896e4c7404991c802552a1c94 (diff) | |
| download | bcm5719-llvm-3ffca790f6003b8c70a5758219a9f08092913e63.tar.gz bcm5719-llvm-3ffca790f6003b8c70a5758219a9f08092913e63.zip | |
Correct types of pointers to doacross_num_done
This field is defined as kmp_int32, so we should use neither
pointers to kmp_int64 nor 64 bit atomic instructions.
(Found while testing on a Raspberry Pi, 32 bit ARM)
Differential Revision: https://reviews.llvm.org/D41656
llvm-svn: 321964
Diffstat (limited to 'openmp/runtime/src/kmp_csupport.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_csupport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index cfaf0f77697..815fe2340c4 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -4032,7 +4032,7 @@ void __kmpc_doacross_post(ident_t *loc, int gtid, long long *vec) { } void __kmpc_doacross_fini(ident_t *loc, int gtid) { - kmp_int64 num_done; + kmp_int32 num_done; kmp_info_t *th = __kmp_threads[gtid]; kmp_team_t *team = th->th.th_team; kmp_disp_t *pr_buf = th->th.th_dispatch; @@ -4042,7 +4042,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) { KA_TRACE(20, ("__kmpc_doacross_fini() exit: serialized team %p\n", team)); return; // nothing to do } - num_done = KMP_TEST_THEN_INC64((kmp_int64 *)pr_buf->th_doacross_info[1]) + 1; + num_done = KMP_TEST_THEN_INC32((kmp_int32 *)pr_buf->th_doacross_info[1]) + 1; if (num_done == th->th.th_team_nproc) { // we are the last thread, need to free shared resources int idx = pr_buf->th_doacross_buf_idx - 1; @@ -4050,7 +4050,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) { &team->t.t_disp_buffer[idx % __kmp_dispatch_num_buffers]; KMP_DEBUG_ASSERT(pr_buf->th_doacross_info[1] == (kmp_int64)&sh_buf->doacross_num_done); - KMP_DEBUG_ASSERT(num_done == (kmp_int64)sh_buf->doacross_num_done); + KMP_DEBUG_ASSERT(num_done == sh_buf->doacross_num_done); KMP_DEBUG_ASSERT(idx == sh_buf->doacross_buf_idx); __kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags)); sh_buf->doacross_flags = NULL; |

