Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / interop_irbuilder.cpp
blobd37a53a418f2a817923b9b03ac18ba9022eca0c5
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs
2 // RUN: %clang_cc1 -verify -triple x86_64-unknown-linux -fopenmp -x c++ -emit-llvm %s -o - | FileCheck %s
4 // expected-no-diagnostics
5 typedef void *omp_interop_t;
7 void test1() {
9 int device_id = 4;
10 int D0, D1, D2;
11 omp_interop_t interop;
13 #pragma omp interop init(target : interop)
15 #pragma omp interop init(targetsync : interop)
17 #pragma omp interop init(target : interop) device(device_id)
19 #pragma omp interop init(targetsync : interop) device(device_id)
21 #pragma omp interop use(interop) depend(in : D0, D1) nowait
23 #pragma omp interop use(interop) depend(in : D0) depend(inout : D1) \
24 depend(out : D2) nowait
26 #pragma omp interop destroy(interop) depend(in : D0, D1)
29 struct S {
30 omp_interop_t interop;
31 void member_test();
34 void S::member_test() {
36 int device_id = 4;
37 int D0, D1, D2;
39 #pragma omp interop init(target : interop)
41 #pragma omp interop init(targetsync : interop)
43 #pragma omp interop init(target : interop) device(device_id)
45 #pragma omp interop init(targetsync : interop) device(device_id)
47 #pragma omp interop use(interop) depend(in : D0, D1) nowait
49 #pragma omp interop use(interop) depend(in : D0) depend(inout : D1) \
50 depend(out : D2) nowait
52 #pragma omp interop destroy(interop) depend(in : D0, D1)
54 // CHECK-LABEL: @_Z5test1v(
55 // CHECK-NEXT: entry:
56 // CHECK-NEXT: [[DEVICE_ID:%.*]] = alloca i32, align 4
57 // CHECK-NEXT: [[D0:%.*]] = alloca i32, align 4
58 // CHECK-NEXT: [[D1:%.*]] = alloca i32, align 4
59 // CHECK-NEXT: [[D2:%.*]] = alloca i32, align 4
60 // CHECK-NEXT: [[INTEROP:%.*]] = alloca ptr, align 8
61 // CHECK-NEXT: [[DOTDEP_ARR_ADDR:%.*]] = alloca [2 x %struct.kmp_depend_info], align 8
62 // CHECK-NEXT: [[DEP_COUNTER_ADDR:%.*]] = alloca i64, align 8
63 // CHECK-NEXT: [[DOTDEP_ARR_ADDR5:%.*]] = alloca [3 x %struct.kmp_depend_info], align 8
64 // CHECK-NEXT: [[DEP_COUNTER_ADDR6:%.*]] = alloca i64, align 8
65 // CHECK-NEXT: [[DOTDEP_ARR_ADDR8:%.*]] = alloca [2 x %struct.kmp_depend_info], align 8
66 // CHECK-NEXT: [[DEP_COUNTER_ADDR9:%.*]] = alloca i64, align 8
67 // CHECK-NEXT: store i32 4, ptr [[DEVICE_ID]], align 4
68 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
69 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]], ptr [[INTEROP]], i32 1, i32 -1, i32 0, ptr null, i32 0)
70 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
71 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM1]], ptr [[INTEROP]], i32 2, i32 -1, i32 0, ptr null, i32 0)
72 // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[DEVICE_ID]], align 4
73 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
74 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM2]], ptr [[INTEROP]], i32 1, i32 [[TMP0]], i32 0, ptr null, i32 0)
75 // CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[DEVICE_ID]], align 4
76 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
77 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]], ptr [[INTEROP]], i32 2, i32 [[TMP1]], i32 0, ptr null, i32 0)
78 // CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR]], i64 0, i64 0
79 // CHECK-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[D0]] to i64
80 // CHECK-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO:%.*]], ptr [[TMP2]], i64 0
81 // CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 0
82 // CHECK-NEXT: store i64 [[TMP3]], ptr [[TMP5]], align 8
83 // CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 1
84 // CHECK-NEXT: store i64 4, ptr [[TMP6]], align 8
85 // CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 2
86 // CHECK-NEXT: store i8 1, ptr [[TMP7]], align 8
87 // CHECK-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[D1]] to i64
88 // CHECK-NEXT: [[TMP9:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP2]], i64 1
89 // CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 0
90 // CHECK-NEXT: store i64 [[TMP8]], ptr [[TMP10]], align 8
91 // CHECK-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 1
92 // CHECK-NEXT: store i64 4, ptr [[TMP11]], align 8
93 // CHECK-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 2
94 // CHECK-NEXT: store i8 1, ptr [[TMP12]], align 8
95 // CHECK-NEXT: store i64 2, ptr [[DEP_COUNTER_ADDR]], align 8
96 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
97 // CHECK-NEXT: call void @__tgt_interop_use(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM4]], ptr [[INTEROP]], i32 -1, i32 2, ptr [[TMP2]], i32 1)
98 // CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
99 // CHECK-NEXT: [[TMP14:%.*]] = ptrtoint ptr [[D0]] to i64
100 // CHECK-NEXT: [[TMP15:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 0
101 // CHECK-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 0
102 // CHECK-NEXT: store i64 [[TMP14]], ptr [[TMP16]], align 8
103 // CHECK-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 1
104 // CHECK-NEXT: store i64 4, ptr [[TMP17]], align 8
105 // CHECK-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 2
106 // CHECK-NEXT: store i8 1, ptr [[TMP18]], align 8
107 // CHECK-NEXT: [[TMP19:%.*]] = ptrtoint ptr [[D1]] to i64
108 // CHECK-NEXT: [[TMP20:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 1
109 // CHECK-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 0
110 // CHECK-NEXT: store i64 [[TMP19]], ptr [[TMP21]], align 8
111 // CHECK-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 1
112 // CHECK-NEXT: store i64 4, ptr [[TMP22]], align 8
113 // CHECK-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 2
114 // CHECK-NEXT: store i8 3, ptr [[TMP23]], align 8
115 // CHECK-NEXT: [[TMP24:%.*]] = ptrtoint ptr [[D2]] to i64
116 // CHECK-NEXT: [[TMP25:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 2
117 // CHECK-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 0
118 // CHECK-NEXT: store i64 [[TMP24]], ptr [[TMP26]], align 8
119 // CHECK-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 1
120 // CHECK-NEXT: store i64 4, ptr [[TMP27]], align 8
121 // CHECK-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 2
122 // CHECK-NEXT: store i8 3, ptr [[TMP28]], align 8
123 // CHECK-NEXT: store i64 3, ptr [[DEP_COUNTER_ADDR6]], align 8
124 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
125 // CHECK-NEXT: call void @__tgt_interop_use(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], ptr [[INTEROP]], i32 -1, i32 3, ptr [[TMP13]], i32 1)
126 // CHECK-NEXT: [[TMP29:%.*]] = getelementptr inbounds [2 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR8]], i64 0, i64 0
127 // CHECK-NEXT: [[TMP30:%.*]] = ptrtoint ptr [[D0]] to i64
128 // CHECK-NEXT: [[TMP31:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP29]], i64 0
129 // CHECK-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 0
130 // CHECK-NEXT: store i64 [[TMP30]], ptr [[TMP32]], align 8
131 // CHECK-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 1
132 // CHECK-NEXT: store i64 4, ptr [[TMP33]], align 8
133 // CHECK-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 2
134 // CHECK-NEXT: store i8 1, ptr [[TMP34]], align 8
135 // CHECK-NEXT: [[TMP35:%.*]] = ptrtoint ptr [[D1]] to i64
136 // CHECK-NEXT: [[TMP36:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP29]], i64 1
137 // CHECK-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 0
138 // CHECK-NEXT: store i64 [[TMP35]], ptr [[TMP37]], align 8
139 // CHECK-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 1
140 // CHECK-NEXT: store i64 4, ptr [[TMP38]], align 8
141 // CHECK-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 2
142 // CHECK-NEXT: store i8 1, ptr [[TMP39]], align 8
143 // CHECK-NEXT: store i64 2, ptr [[DEP_COUNTER_ADDR9]], align 8
144 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
145 // CHECK-NEXT: call void @__tgt_interop_destroy(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], ptr [[INTEROP]], i32 -1, i32 2, ptr [[TMP29]], i32 0)
146 // CHECK-NEXT: ret void
149 // CHECK-LABEL: @_ZN1S11member_testEv(
150 // CHECK-NEXT: entry:
151 // CHECK-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
152 // CHECK-NEXT: [[DEVICE_ID:%.*]] = alloca i32, align 4
153 // CHECK-NEXT: [[D0:%.*]] = alloca i32, align 4
154 // CHECK-NEXT: [[D1:%.*]] = alloca i32, align 4
155 // CHECK-NEXT: [[D2:%.*]] = alloca i32, align 4
156 // CHECK-NEXT: [[DOTDEP_ARR_ADDR:%.*]] = alloca [2 x %struct.kmp_depend_info], align 8
157 // CHECK-NEXT: [[DEP_COUNTER_ADDR:%.*]] = alloca i64, align 8
158 // CHECK-NEXT: [[DOTDEP_ARR_ADDR10:%.*]] = alloca [3 x %struct.kmp_depend_info], align 8
159 // CHECK-NEXT: [[DEP_COUNTER_ADDR11:%.*]] = alloca i64, align 8
160 // CHECK-NEXT: [[DOTDEP_ARR_ADDR14:%.*]] = alloca [2 x %struct.kmp_depend_info], align 8
161 // CHECK-NEXT: [[DEP_COUNTER_ADDR15:%.*]] = alloca i64, align 8
162 // CHECK-NEXT: store ptr [[THIS:%.*]], ptr [[THIS_ADDR]], align 8
163 // CHECK-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
164 // CHECK-NEXT: store i32 4, ptr [[DEVICE_ID]], align 4
165 // CHECK-NEXT: [[INTEROP:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
166 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
167 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]], ptr [[INTEROP]], i32 1, i32 -1, i32 0, ptr null, i32 0)
168 // CHECK-NEXT: [[INTEROP2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
169 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
170 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]], ptr [[INTEROP2]], i32 2, i32 -1, i32 0, ptr null, i32 0)
171 // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[DEVICE_ID]], align 4
172 // CHECK-NEXT: [[INTEROP4:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
173 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
174 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[INTEROP4]], i32 1, i32 [[TMP0]], i32 0, ptr null, i32 0)
175 // CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[DEVICE_ID]], align 4
176 // CHECK-NEXT: [[INTEROP6:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
177 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
178 // CHECK-NEXT: call void @__tgt_interop_init(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], ptr [[INTEROP6]], i32 2, i32 [[TMP1]], i32 0, ptr null, i32 0)
179 // CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR]], i64 0, i64 0
180 // CHECK-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[D0]] to i64
181 // CHECK-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO:%.*]], ptr [[TMP2]], i64 0
182 // CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 0
183 // CHECK-NEXT: store i64 [[TMP3]], ptr [[TMP5]], align 8
184 // CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 1
185 // CHECK-NEXT: store i64 4, ptr [[TMP6]], align 8
186 // CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP4]], i32 0, i32 2
187 // CHECK-NEXT: store i8 1, ptr [[TMP7]], align 8
188 // CHECK-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[D1]] to i64
189 // CHECK-NEXT: [[TMP9:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP2]], i64 1
190 // CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 0
191 // CHECK-NEXT: store i64 [[TMP8]], ptr [[TMP10]], align 8
192 // CHECK-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 1
193 // CHECK-NEXT: store i64 4, ptr [[TMP11]], align 8
194 // CHECK-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP9]], i32 0, i32 2
195 // CHECK-NEXT: store i8 1, ptr [[TMP12]], align 8
196 // CHECK-NEXT: store i64 2, ptr [[DEP_COUNTER_ADDR]], align 8
197 // CHECK-NEXT: [[INTEROP8:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
198 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM9:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
199 // CHECK-NEXT: call void @__tgt_interop_use(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM9]], ptr [[INTEROP8]], i32 -1, i32 2, ptr [[TMP2]], i32 1)
200 // CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR10]], i64 0, i64 0
201 // CHECK-NEXT: [[TMP14:%.*]] = ptrtoint ptr [[D0]] to i64
202 // CHECK-NEXT: [[TMP15:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 0
203 // CHECK-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 0
204 // CHECK-NEXT: store i64 [[TMP14]], ptr [[TMP16]], align 8
205 // CHECK-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 1
206 // CHECK-NEXT: store i64 4, ptr [[TMP17]], align 8
207 // CHECK-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP15]], i32 0, i32 2
208 // CHECK-NEXT: store i8 1, ptr [[TMP18]], align 8
209 // CHECK-NEXT: [[TMP19:%.*]] = ptrtoint ptr [[D1]] to i64
210 // CHECK-NEXT: [[TMP20:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 1
211 // CHECK-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 0
212 // CHECK-NEXT: store i64 [[TMP19]], ptr [[TMP21]], align 8
213 // CHECK-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 1
214 // CHECK-NEXT: store i64 4, ptr [[TMP22]], align 8
215 // CHECK-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP20]], i32 0, i32 2
216 // CHECK-NEXT: store i8 3, ptr [[TMP23]], align 8
217 // CHECK-NEXT: [[TMP24:%.*]] = ptrtoint ptr [[D2]] to i64
218 // CHECK-NEXT: [[TMP25:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP13]], i64 2
219 // CHECK-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 0
220 // CHECK-NEXT: store i64 [[TMP24]], ptr [[TMP26]], align 8
221 // CHECK-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 1
222 // CHECK-NEXT: store i64 4, ptr [[TMP27]], align 8
223 // CHECK-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP25]], i32 0, i32 2
224 // CHECK-NEXT: store i8 3, ptr [[TMP28]], align 8
225 // CHECK-NEXT: store i64 3, ptr [[DEP_COUNTER_ADDR11]], align 8
226 // CHECK-NEXT: [[INTEROP12:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
227 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM13:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
228 // CHECK-NEXT: call void @__tgt_interop_use(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM13]], ptr [[INTEROP12]], i32 -1, i32 3, ptr [[TMP13]], i32 1)
229 // CHECK-NEXT: [[TMP29:%.*]] = getelementptr inbounds [2 x %struct.kmp_depend_info], ptr [[DOTDEP_ARR_ADDR14]], i64 0, i64 0
230 // CHECK-NEXT: [[TMP30:%.*]] = ptrtoint ptr [[D0]] to i64
231 // CHECK-NEXT: [[TMP31:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP29]], i64 0
232 // CHECK-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 0
233 // CHECK-NEXT: store i64 [[TMP30]], ptr [[TMP32]], align 8
234 // CHECK-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 1
235 // CHECK-NEXT: store i64 4, ptr [[TMP33]], align 8
236 // CHECK-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP31]], i32 0, i32 2
237 // CHECK-NEXT: store i8 1, ptr [[TMP34]], align 8
238 // CHECK-NEXT: [[TMP35:%.*]] = ptrtoint ptr [[D1]] to i64
239 // CHECK-NEXT: [[TMP36:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP29]], i64 1
240 // CHECK-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 0
241 // CHECK-NEXT: store i64 [[TMP35]], ptr [[TMP37]], align 8
242 // CHECK-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 1
243 // CHECK-NEXT: store i64 4, ptr [[TMP38]], align 8
244 // CHECK-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP36]], i32 0, i32 2
245 // CHECK-NEXT: store i8 1, ptr [[TMP39]], align 8
246 // CHECK-NEXT: store i64 2, ptr [[DEP_COUNTER_ADDR15]], align 8
247 // CHECK-NEXT: [[INTEROP16:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[THIS1]], i32 0, i32 0
248 // CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM17:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
249 // CHECK-NEXT: call void @__tgt_interop_destroy(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM17]], ptr [[INTEROP16]], i32 -1, i32 2, ptr [[TMP29]], i32 0)
250 // CHECK-NEXT: ret void