1
- // RUN: %libomptarget-compile-generic -fprofile-generate
1
+ // RUN: %libomptarget-compile-generic -fprofile-generate \
2
+ // RUN: -fprofile-update=atomic
2
3
// RUN: env LLVM_PROFILE_FILE=%basename_t.llvm.profraw \
3
4
// RUN: %libomptarget-run-generic 2>&1
4
5
// RUN: llvm-profdata show --all-functions --counts \
8
9
// RUN: %target_triple.%basename_t.llvm.profraw \
9
10
// RUN: | %fcheck-generic --check-prefix="LLVM-DEVICE"
10
11
11
- // RUN: %libomptarget-compile-generic -fprofile-instr-generate
12
+ // RUN: %libomptarget-compile-generic -fprofile-instr-generate \
13
+ // RUN: -fprofile-update=atomic
12
14
// RUN: env LLVM_PROFILE_FILE=%basename_t.clang.profraw \
13
15
// RUN: %libomptarget-run-generic 2>&1
14
16
// RUN: llvm-profdata show --all-functions --counts \
18
20
// RUN: %target_triple.%basename_t.clang.profraw | \
19
21
// RUN: %fcheck-generic --check-prefix="CLANG-DEV"
20
22
21
- // RUN: %libomptarget-compile-generic -Xarch_host -fprofile-generate
23
+ // RUN: %libomptarget-compile-generic -Xarch_host -fprofile-generate \
24
+ // RUN: -fprofile-update=atomic
22
25
// RUN: env LLVM_PROFILE_FILE=%basename_t.nogpu.profraw \
23
26
// RUN: %libomptarget-run-generic 2>&1
24
27
// RUN: llvm-profdata show --all-functions --counts \
27
30
// RUN: not test -e %target_triple.%basename_t.nogpu.profraw
28
31
29
32
// RUN: %libomptarget-compile-generic -Xarch_host -fprofile-generate \
30
- // RUN: -Xarch_device -fprofile-instr-generate
33
+ // RUN: -Xarch_device -fprofile-instr-generate -fprofile-update=atomic
31
34
// RUN: env LLVM_PROFILE_FILE=%basename_t.hidf.profraw \
32
35
// RUN: %libomptarget-run-generic 2>&1
33
36
// RUN: llvm-profdata show --all-functions --counts \
38
41
// RUN: | %fcheck-generic --check-prefix="CLANG-DEV"
39
42
40
43
// RUN: %libomptarget-compile-generic -Xarch_device -fprofile-generate \
41
- // RUN: -Xarch_host -fprofile-instr-generate
44
+ // RUN: -Xarch_host -fprofile-instr-generate -fprofile-update=atomic
42
45
// RUN: env LLVM_PROFILE_FILE=%basename_t.hfdi.profraw \
43
46
// RUN: %libomptarget-run-generic 2>&1
44
47
// RUN: llvm-profdata show --all-functions --counts \
@@ -59,8 +62,10 @@ int main() {
59
62
60
63
int device_var = 1 ;
61
64
#pragma omp target
62
- for (int i = 0 ; i < 10 ; i ++ ) {
63
- device_var *= i ;
65
+ {
66
+ for (int i = 0 ; i < 10 ; i ++ ) {
67
+ device_var *= i ;
68
+ }
64
69
}
65
70
}
66
71
@@ -78,7 +83,7 @@ int main() {
78
83
// LLVM-DEVICE-LABEL: __omp_offloading_{{[_0-9a-zA-Z]*}}_main_{{[_0-9a-zA-Z]*}}:
79
84
// LLVM-DEVICE: Hash: {{0[xX][0-9a-fA-F]+}}
80
85
// LLVM-DEVICE: Counters: 3
81
- // LLVM-DEVICE: Block counts: [10, 2 , 1]
86
+ // LLVM-DEVICE: Block counts: [10, {{.*}} , 1]
82
87
// LLVM-DEVICE: Instrumentation level: IR
83
88
84
89
// CLANG-HOST-LABEL: main:
@@ -97,6 +102,5 @@ int main() {
97
102
// CLANG-DEV-LABEL: __omp_offloading_{{[_0-9a-zA-Z]*}}_main_{{[_0-9a-zA-Z]*}}:
98
103
// CLANG-DEV: Hash: {{0[xX][0-9a-fA-F]+}}
99
104
// CLANG-DEV: Counters: 2
100
- // CLANG-DEV: Function count: 0
101
- // CLANG-DEV: Block counts: [11]
105
+ // CLANG-DEV: Block counts: [10]
102
106
// CLANG-DEV: Instrumentation level: Front-end
0 commit comments