1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
2 ; RUN: opt -S -passes=inline %s | FileCheck %s
3 ; RUN: opt -S -passes='cgscc(inline)' %s | FileCheck %s
4 ; RUN: opt -S -passes='module-inline' %s | FileCheck %s
6 declare void @bar1(ptr %p)
7 declare void @bar2(ptr %p, ptr %p2)
8 declare void @bar3(ptr writable %p)
9 declare void @bar4(ptr byval([4 x i32]) %p)
10 define dso_local void @foo1_rdonly(ptr readonly %p) {
11 ; CHECK-LABEL: define {{[^@]+}}@foo1_rdonly
12 ; CHECK-SAME: (ptr readonly [[P:%.*]]) {
13 ; CHECK-NEXT: call void @bar1(ptr [[P]])
14 ; CHECK-NEXT: ret void
16 call void @bar1(ptr %p)
20 define dso_local void @foo1(ptr %p) {
21 ; CHECK-LABEL: define {{[^@]+}}@foo1
22 ; CHECK-SAME: (ptr [[P:%.*]]) {
23 ; CHECK-NEXT: call void @bar1(ptr [[P]])
24 ; CHECK-NEXT: ret void
26 call void @bar1(ptr %p)
30 define dso_local void @foo1_writable(ptr %p) {
31 ; CHECK-LABEL: define {{[^@]+}}@foo1_writable
32 ; CHECK-SAME: (ptr [[P:%.*]]) {
33 ; CHECK-NEXT: call void @bar1(ptr writable [[P]])
34 ; CHECK-NEXT: ret void
36 call void @bar1(ptr writable %p)
40 define dso_local void @foo3_writable(ptr %p) {
41 ; CHECK-LABEL: define {{[^@]+}}@foo3_writable
42 ; CHECK-SAME: (ptr [[P:%.*]]) {
43 ; CHECK-NEXT: call void @bar3(ptr [[P]])
44 ; CHECK-NEXT: ret void
46 call void @bar3(ptr %p)
51 define dso_local void @foo1_bar_aligned64_deref512(ptr %p) {
52 ; CHECK-LABEL: define {{[^@]+}}@foo1_bar_aligned64_deref512
53 ; CHECK-SAME: (ptr [[P:%.*]]) {
54 ; CHECK-NEXT: call void @bar1(ptr align 64 dereferenceable(512) [[P]])
55 ; CHECK-NEXT: ret void
57 call void @bar1(ptr align 64 dereferenceable(512) %p)
61 define dso_local void @foo1_bar_aligned512_deref_or_null512(ptr %p) {
62 ; CHECK-LABEL: define {{[^@]+}}@foo1_bar_aligned512_deref_or_null512
63 ; CHECK-SAME: (ptr [[P:%.*]]) {
64 ; CHECK-NEXT: call void @bar1(ptr align 512 dereferenceable_or_null(512) [[P]])
65 ; CHECK-NEXT: ret void
67 call void @bar1(ptr align 512 dereferenceable_or_null(512) %p)
71 define dso_local void @foo2(ptr %p, ptr %p2) {
72 ; CHECK-LABEL: define {{[^@]+}}@foo2
73 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
74 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
75 ; CHECK-NEXT: ret void
77 call void @bar2(ptr %p, ptr %p)
81 define dso_local void @foo2_2(ptr %p, ptr %p2) {
82 ; CHECK-LABEL: define {{[^@]+}}@foo2_2
83 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
84 ; CHECK-NEXT: call void @bar2(ptr [[P2]], ptr [[P2]])
85 ; CHECK-NEXT: ret void
87 call void @bar2(ptr %p2, ptr %p2)
91 define dso_local void @foo2_3(ptr %p, ptr readnone %p2) {
92 ; CHECK-LABEL: define {{[^@]+}}@foo2_3
93 ; CHECK-SAME: (ptr [[P:%.*]], ptr readnone [[P2:%.*]]) {
94 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P2]])
95 ; CHECK-NEXT: ret void
97 call void @bar2(ptr %p, ptr %p2)
101 define dso_local void @buz1_wronly(ptr %p) writeonly {
102 ; CHECK: Function Attrs: memory(write)
103 ; CHECK-LABEL: define {{[^@]+}}@buz1_wronly
104 ; CHECK-SAME: (ptr [[P:%.*]]) #[[ATTR0:[0-9]+]] {
105 ; CHECK-NEXT: call void @bar1(ptr [[P]])
106 ; CHECK-NEXT: ret void
108 call void @bar1(ptr %p)
112 define dso_local void @buz1(ptr %p) {
113 ; CHECK-LABEL: define {{[^@]+}}@buz1
114 ; CHECK-SAME: (ptr [[P:%.*]]) {
115 ; CHECK-NEXT: call void @bar1(ptr [[P]])
116 ; CHECK-NEXT: ret void
118 call void @bar1(ptr %p)
122 define dso_local void @buz1_wronly_fail_alloca(ptr %p) writeonly {
123 ; CHECK: Function Attrs: memory(write)
124 ; CHECK-LABEL: define {{[^@]+}}@buz1_wronly_fail_alloca
125 ; CHECK-SAME: (ptr [[P:%.*]]) #[[ATTR0]] {
126 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
127 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A]])
128 ; CHECK-NEXT: ret void
130 %a = alloca i32, align 4
131 call void @bar2(ptr %p, ptr %a)
135 define dso_local void @buz1_fail_alloca(ptr %p) {
136 ; CHECK-LABEL: define {{[^@]+}}@buz1_fail_alloca
137 ; CHECK-SAME: (ptr [[P:%.*]]) {
138 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
139 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A]])
140 ; CHECK-NEXT: ret void
142 %a = alloca i32, align 4
143 call void @bar2(ptr %p, ptr %a)
147 define dso_local void @buz1_wronly_partially_okay_alloca(ptr %p) writeonly {
148 ; CHECK: Function Attrs: memory(write)
149 ; CHECK-LABEL: define {{[^@]+}}@buz1_wronly_partially_okay_alloca
150 ; CHECK-SAME: (ptr [[P:%.*]]) #[[ATTR0]] {
151 ; CHECK-NEXT: call void @bar1(ptr [[P]])
152 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
153 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A]])
154 ; CHECK-NEXT: ret void
156 call void @bar1(ptr %p)
157 %a = alloca i32, align 4
158 call void @bar2(ptr %p, ptr %a)
162 define dso_local void @buz1_partially_okay_alloca(ptr %p) {
163 ; CHECK-LABEL: define {{[^@]+}}@buz1_partially_okay_alloca
164 ; CHECK-SAME: (ptr [[P:%.*]]) {
165 ; CHECK-NEXT: call void @bar1(ptr [[P]])
166 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
167 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A]])
168 ; CHECK-NEXT: ret void
170 call void @bar1(ptr %p)
171 %a = alloca i32, align 4
172 call void @bar2(ptr %p, ptr %a)
176 define dso_local void @foo2_through_obj(ptr %p, ptr %p2) {
177 ; CHECK-LABEL: define {{[^@]+}}@foo2_through_obj
178 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
179 ; CHECK-NEXT: [[PP:%.*]] = getelementptr i8, ptr [[P]], i64 9
180 ; CHECK-NEXT: [[P2P:%.*]] = getelementptr i8, ptr [[P2]], i64 123
181 ; CHECK-NEXT: call void @bar2(ptr [[P2P]], ptr [[PP]])
182 ; CHECK-NEXT: ret void
184 %pp = getelementptr i8, ptr %p, i64 9
185 %p2p = getelementptr i8, ptr %p2, i64 123
186 call void @bar2(ptr %p2p, ptr %pp)
190 define dso_local void @foo_byval_readonly(ptr readonly %p) {
191 ; CHECK-LABEL: define {{[^@]+}}@foo_byval_readonly
192 ; CHECK-SAME: (ptr readonly [[P:%.*]]) {
193 ; CHECK-NEXT: call void @bar4(ptr byval([4 x i32]) [[P]])
194 ; CHECK-NEXT: ret void
196 call void @bar4(ptr byval([4 x i32]) %p)
200 define void @prop_param_func_decl(ptr %p) {
201 ; CHECK-LABEL: define {{[^@]+}}@prop_param_func_decl
202 ; CHECK-SAME: (ptr [[P:%.*]]) {
203 ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
204 ; CHECK-NEXT: ret void
206 call void @foo1_rdonly(ptr %p)
210 define void @prop_param_callbase_def(ptr %p) {
211 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def
212 ; CHECK-SAME: (ptr [[P:%.*]]) {
213 ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
214 ; CHECK-NEXT: call void @bar1(ptr [[P]])
215 ; CHECK-NEXT: ret void
217 call void @foo1(ptr readonly %p)
218 call void @bar1(ptr %p)
222 define void @prop_param_callbase_def_2x(ptr %p, ptr %p2) {
223 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x
224 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
225 ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
226 ; CHECK-NEXT: ret void
228 call void @foo2(ptr readonly %p, ptr %p)
232 define void @prop_param_callbase_def_2x_2(ptr %p, ptr %p2) {
233 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_2
234 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
235 ; CHECK-NEXT: [[PP_I:%.*]] = getelementptr i8, ptr [[P]], i64 9
236 ; CHECK-NEXT: [[P2P_I:%.*]] = getelementptr i8, ptr [[P2]], i64 123
237 ; CHECK-NEXT: call void @bar2(ptr [[P2P_I]], ptr readonly [[PP_I]])
238 ; CHECK-NEXT: ret void
240 call void @foo2_through_obj(ptr readonly %p, ptr writeonly %p2)
244 define void @prop_param_callbase_def_2x_incompat(ptr %p, ptr %p2) {
245 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_incompat
246 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
247 ; CHECK-NEXT: [[PP_I:%.*]] = getelementptr i8, ptr [[P]], i64 9
248 ; CHECK-NEXT: [[P2P_I:%.*]] = getelementptr i8, ptr [[P]], i64 123
249 ; CHECK-NEXT: call void @bar2(ptr readonly [[P2P_I]], ptr readnone [[PP_I]])
250 ; CHECK-NEXT: ret void
252 call void @foo2_through_obj(ptr readnone %p, ptr readonly %p)
256 define void @prop_param_callbase_def_2x_incompat_2(ptr %p, ptr %p2) {
257 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_incompat_2
258 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
259 ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
260 ; CHECK-NEXT: ret void
262 call void @foo2(ptr readonly %p, ptr readnone %p)
266 define void @prop_param_callbase_def_2x_incompat_3(ptr %p, ptr %p2) {
267 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_incompat_3
268 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
269 ; CHECK-NEXT: call void @bar2(ptr readnone [[P]], ptr readnone [[P]])
270 ; CHECK-NEXT: ret void
272 call void @foo2_2(ptr readonly %p, ptr readnone %p)
276 define void @prop_param_callbase_def_1x_partial(ptr %p, ptr %p2) {
277 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_1x_partial
278 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
279 ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
280 ; CHECK-NEXT: ret void
282 call void @foo2(ptr readonly %p, ptr %p)
286 define void @prop_param_callbase_def_1x_partial_2(ptr %p, ptr %p2) {
287 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_1x_partial_2
288 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
289 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
290 ; CHECK-NEXT: ret void
292 call void @foo2_2(ptr readonly %p, ptr %p)
296 define void @prop_param_callbase_def_1x_partial_3(ptr %p, ptr %p2) {
297 ; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_1x_partial_3
298 ; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
299 ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readnone [[P]])
300 ; CHECK-NEXT: ret void
302 call void @foo2_3(ptr readonly %p, ptr %p)
306 define void @prop_deref(ptr %p) {
307 ; CHECK-LABEL: define {{[^@]+}}@prop_deref
308 ; CHECK-SAME: (ptr [[P:%.*]]) {
309 ; CHECK-NEXT: call void @bar1(ptr [[P]])
310 ; CHECK-NEXT: ret void
312 call void @foo1(ptr dereferenceable(16) %p)
316 define void @prop_deref_or_null(ptr %p) {
317 ; CHECK-LABEL: define {{[^@]+}}@prop_deref_or_null
318 ; CHECK-SAME: (ptr [[P:%.*]]) {
319 ; CHECK-NEXT: call void @bar1(ptr [[P]])
320 ; CHECK-NEXT: ret void
322 call void @foo1(ptr dereferenceable_or_null(256) %p)
326 define void @prop_param_nonnull_and_align(ptr %p) {
327 ; CHECK-LABEL: define {{[^@]+}}@prop_param_nonnull_and_align
328 ; CHECK-SAME: (ptr [[P:%.*]]) {
329 ; CHECK-NEXT: call void @bar1(ptr [[P]])
330 ; CHECK-NEXT: ret void
332 call void @foo1(ptr nonnull align 32 %p)
336 define void @prop_param_deref_align_no_update(ptr %p) {
337 ; CHECK-LABEL: define {{[^@]+}}@prop_param_deref_align_no_update
338 ; CHECK-SAME: (ptr [[P:%.*]]) {
339 ; CHECK-NEXT: call void @bar1(ptr align 64 dereferenceable(512) [[P]])
340 ; CHECK-NEXT: ret void
342 call void @foo1_bar_aligned64_deref512(ptr align 4 dereferenceable(64) %p)
346 define void @prop_param_deref_align_update(ptr %p) {
347 ; CHECK-LABEL: define {{[^@]+}}@prop_param_deref_align_update
348 ; CHECK-SAME: (ptr [[P:%.*]]) {
349 ; CHECK-NEXT: call void @bar1(ptr align 64 dereferenceable(512) [[P]])
350 ; CHECK-NEXT: ret void
352 call void @foo1_bar_aligned64_deref512(ptr align 128 dereferenceable(1024) %p)
356 define void @prop_param_deref_or_null_update(ptr %p) {
357 ; CHECK-LABEL: define {{[^@]+}}@prop_param_deref_or_null_update
358 ; CHECK-SAME: (ptr [[P:%.*]]) {
359 ; CHECK-NEXT: call void @bar1(ptr align 512 dereferenceable_or_null(512) [[P]])
360 ; CHECK-NEXT: ret void
362 call void @foo1_bar_aligned512_deref_or_null512(ptr dereferenceable_or_null(1024) %p)
366 define void @prop_param_deref_or_null_no_update(ptr %p) {
367 ; CHECK-LABEL: define {{[^@]+}}@prop_param_deref_or_null_no_update
368 ; CHECK-SAME: (ptr [[P:%.*]]) {
369 ; CHECK-NEXT: call void @bar1(ptr align 512 dereferenceable_or_null(512) [[P]])
370 ; CHECK-NEXT: ret void
372 call void @foo1_bar_aligned512_deref_or_null512(ptr dereferenceable_or_null(32) %p)
376 define void @prop_fn_decl(ptr %p) {
377 ; CHECK-LABEL: define {{[^@]+}}@prop_fn_decl
378 ; CHECK-SAME: (ptr [[P:%.*]]) {
379 ; CHECK-NEXT: call void @bar1(ptr [[P]])
380 ; CHECK-NEXT: call void @bar1(ptr [[P]])
381 ; CHECK-NEXT: ret void
383 call void @buz1_wronly(ptr %p)
384 call void @bar1(ptr %p)
388 define void @prop_cb_def_wr(ptr %p) {
389 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_wr
390 ; CHECK-SAME: (ptr [[P:%.*]]) {
391 ; CHECK-NEXT: call void @bar1(ptr [[P]])
392 ; CHECK-NEXT: call void @bar1(ptr [[P]])
393 ; CHECK-NEXT: ret void
395 call void @buz1(ptr %p) writeonly
396 call void @bar1(ptr %p)
400 define void @prop_fn_decl_fail_alloca(ptr %p) {
401 ; CHECK-LABEL: define {{[^@]+}}@prop_fn_decl_fail_alloca
402 ; CHECK-SAME: (ptr [[P:%.*]]) {
403 ; CHECK-NEXT: [[A_I:%.*]] = alloca i32, align 4
404 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[A_I]])
405 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A_I]])
406 ; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[A_I]])
407 ; CHECK-NEXT: call void @bar1(ptr [[P]])
408 ; CHECK-NEXT: ret void
410 call void @buz1_wronly_fail_alloca(ptr %p)
411 call void @bar1(ptr %p)
415 define void @prop_cb_def_wr_fail_alloca(ptr %p) {
416 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_wr_fail_alloca
417 ; CHECK-SAME: (ptr [[P:%.*]]) {
418 ; CHECK-NEXT: [[A_I:%.*]] = alloca i32, align 4
419 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[A_I]])
420 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A_I]])
421 ; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[A_I]])
422 ; CHECK-NEXT: call void @bar1(ptr [[P]])
423 ; CHECK-NEXT: ret void
425 call void @buz1_fail_alloca(ptr %p) writeonly
426 call void @bar1(ptr %p)
430 define void @prop_fn_decl_partially_okay_alloca(ptr %p) {
431 ; CHECK-LABEL: define {{[^@]+}}@prop_fn_decl_partially_okay_alloca
432 ; CHECK-SAME: (ptr [[P:%.*]]) {
433 ; CHECK-NEXT: [[A_I:%.*]] = alloca i32, align 4
434 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[A_I]])
435 ; CHECK-NEXT: call void @bar1(ptr [[P]])
436 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A_I]])
437 ; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[A_I]])
438 ; CHECK-NEXT: call void @bar1(ptr [[P]])
439 ; CHECK-NEXT: ret void
441 call void @buz1_wronly_partially_okay_alloca(ptr %p)
442 call void @bar1(ptr %p)
446 define void @prop_cb_def_wr_partially_okay_alloca(ptr %p) {
447 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_wr_partially_okay_alloca
448 ; CHECK-SAME: (ptr [[P:%.*]]) {
449 ; CHECK-NEXT: [[A_I:%.*]] = alloca i32, align 4
450 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr [[A_I]])
451 ; CHECK-NEXT: call void @bar1(ptr [[P]])
452 ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[A_I]])
453 ; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr [[A_I]])
454 ; CHECK-NEXT: call void @bar1(ptr [[P]])
455 ; CHECK-NEXT: ret void
457 call void @buz1_partially_okay_alloca(ptr %p) writeonly
458 call void @bar1(ptr %p)
462 define void @prop_cb_def_readonly(ptr %p) {
463 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_readonly
464 ; CHECK-SAME: (ptr [[P:%.*]]) {
465 ; CHECK-NEXT: call void @bar1(ptr [[P]])
466 ; CHECK-NEXT: ret void
468 call void @foo1(ptr %p) readonly
472 define void @prop_cb_def_readnone(ptr %p) {
473 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_readnone
474 ; CHECK-SAME: (ptr [[P:%.*]]) {
475 ; CHECK-NEXT: call void @bar1(ptr [[P]])
476 ; CHECK-NEXT: ret void
478 call void @foo1(ptr %p) readnone
482 define void @prop_cb_def_argmem_readonly_fail(ptr %p) {
483 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_argmem_readonly_fail
484 ; CHECK-SAME: (ptr [[P:%.*]]) {
485 ; CHECK-NEXT: call void @bar1(ptr [[P]])
486 ; CHECK-NEXT: ret void
488 call void @foo1(ptr %p) memory(argmem:read)
492 define void @prop_cb_def_inaccessible_none(ptr %p) {
493 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_inaccessible_none
494 ; CHECK-SAME: (ptr [[P:%.*]]) {
495 ; CHECK-NEXT: call void @bar1(ptr [[P]])
496 ; CHECK-NEXT: ret void
498 call void @foo1(ptr %p) memory(inaccessiblemem:none)
502 define void @prop_cb_def_inaccessible_none_argmem_none(ptr %p) {
503 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_inaccessible_none_argmem_none
504 ; CHECK-SAME: (ptr [[P:%.*]]) {
505 ; CHECK-NEXT: call void @bar1(ptr [[P]])
506 ; CHECK-NEXT: ret void
508 call void @foo1(ptr %p) memory(inaccessiblemem:none, argmem:none)
512 define void @prop_cb_def_willreturn(ptr %p) {
513 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_willreturn
514 ; CHECK-SAME: (ptr [[P:%.*]]) {
515 ; CHECK-NEXT: call void @bar1(ptr [[P]])
516 ; CHECK-NEXT: ret void
518 call void @foo1(ptr %p) willreturn
522 define void @prop_cb_def_mustprogress(ptr %p) {
523 ; CHECK-LABEL: define {{[^@]+}}@prop_cb_def_mustprogress
524 ; CHECK-SAME: (ptr [[P:%.*]]) {
525 ; CHECK-NEXT: call void @bar1(ptr [[P]])
526 ; CHECK-NEXT: ret void
528 call void @foo1(ptr %p) mustprogress
532 define void @prop_no_conflict_writable(ptr %p) {
533 ; CHECK-LABEL: define {{[^@]+}}@prop_no_conflict_writable
534 ; CHECK-SAME: (ptr [[P:%.*]]) {
535 ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
536 ; CHECK-NEXT: ret void
538 call void @foo1_writable(ptr readonly %p)
543 define void @prop_no_conflict_writable2(ptr %p) {
544 ; CHECK-LABEL: define {{[^@]+}}@prop_no_conflict_writable2
545 ; CHECK-SAME: (ptr [[P:%.*]]) {
546 ; CHECK-NEXT: call void @bar3(ptr readnone [[P]])
547 ; CHECK-NEXT: ret void
549 call void @foo3_writable(ptr readnone %p)
553 define void @prop_byval_readonly(ptr %p) {
554 ; CHECK-LABEL: define {{[^@]+}}@prop_byval_readonly
555 ; CHECK-SAME: (ptr [[P:%.*]]) {
556 ; CHECK-NEXT: call void @bar4(ptr byval([4 x i32]) [[P]])
557 ; CHECK-NEXT: ret void
559 call void @foo_byval_readonly(ptr %p)