1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2 ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
3 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
4 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
5 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
7 declare noalias i8* @malloc(i64)
9 declare void @nocapture_func_frees_pointer(i8* nocapture)
11 declare void @func_throws(...)
13 declare void @sync_func(i8* %p)
15 declare void @sync_will_return(i8* %p) willreturn nounwind
17 declare void @no_sync_func(i8* nocapture %p) nofree nosync willreturn
19 declare void @nofree_func(i8* nocapture %p) nofree nosync willreturn
21 declare void @foo(i32* %p)
23 declare void @foo_nounw(i32* %p) nounwind nofree
25 declare void @usei8(i8)
27 declare i32 @no_return_call() noreturn
29 declare void @free(i8* nocapture)
31 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
33 define void @h2s_value_simplify_interaction(i1 %c, i8* %A) {
34 ; IS________OPM-LABEL: define {{[^@]+}}@h2s_value_simplify_interaction
35 ; IS________OPM-SAME: (i1 [[C:%.*]], i8* nocapture nofree readnone [[A:%.*]]) {
36 ; IS________OPM-NEXT: entry:
37 ; IS________OPM-NEXT: [[M:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
38 ; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
40 ; IS________OPM-NEXT: br i1 false, label [[DEAD:%.*]], label [[F2:%.*]]
42 ; IS________OPM-NEXT: br label [[J:%.*]]
44 ; IS________OPM-NEXT: [[C1:%.*]] = bitcast i8* [[M]] to i32*
45 ; IS________OPM-NEXT: [[C2:%.*]] = bitcast i32* [[C1]] to i8*
46 ; IS________OPM-NEXT: [[L:%.*]] = load i8, i8* [[C2]], align 1
47 ; IS________OPM-NEXT: call void @usei8(i8 [[L]])
48 ; IS________OPM-NEXT: call void @no_sync_func(i8* nocapture nofree noundef [[C2]]) #[[ATTR5:[0-9]+]]
49 ; IS________OPM-NEXT: br label [[J]]
50 ; IS________OPM: dead:
51 ; IS________OPM-NEXT: unreachable
53 ; IS________OPM-NEXT: [[PHI:%.*]] = phi i8* [ [[M]], [[F]] ], [ null, [[F2]] ]
54 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree noundef [[PHI]]) #[[ATTR5]]
55 ; IS________OPM-NEXT: ret void
57 ; IS________NPM-LABEL: define {{[^@]+}}@h2s_value_simplify_interaction
58 ; IS________NPM-SAME: (i1 [[C:%.*]], i8* nocapture nofree readnone [[A:%.*]]) {
59 ; IS________NPM-NEXT: entry:
60 ; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 4, align 1
61 ; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
63 ; IS________NPM-NEXT: br i1 false, label [[DEAD:%.*]], label [[F2:%.*]]
65 ; IS________NPM-NEXT: br label [[J:%.*]]
67 ; IS________NPM-NEXT: [[L:%.*]] = load i8, i8* [[TMP0]], align 1
68 ; IS________NPM-NEXT: call void @usei8(i8 [[L]])
69 ; IS________NPM-NEXT: call void @no_sync_func(i8* nocapture nofree noundef [[TMP0]]) #[[ATTR6:[0-9]+]]
70 ; IS________NPM-NEXT: br label [[J]]
71 ; IS________NPM: dead:
72 ; IS________NPM-NEXT: unreachable
74 ; IS________NPM-NEXT: [[PHI:%.*]] = phi i8* [ [[TMP0]], [[F]] ], [ null, [[F2]] ]
75 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree noundef [[PHI]]) #[[ATTR6]]
76 ; IS________NPM-NEXT: ret void
80 %m = tail call noalias i8* @malloc(i64 %add)
81 br i1 %c, label %t, label %f
83 br i1 false, label %dead, label %f2
87 %c1 = bitcast i8* %m to i32*
88 %c2 = bitcast i32* %c1 to i8*
90 call void @usei8(i8 %l)
91 call void @no_sync_func(i8* noundef %c2) nounwind
96 %phi = phi i8* [ %m, %f ], [ null, %f2 ], [ %A, %dead ]
97 tail call void @no_sync_func(i8* noundef %phi) nounwind
98 ;tail call void @free(i8* %m)
102 define void @nofree_arg_only(i8* %p1, i8* %p2) {
103 ; CHECK-LABEL: define {{[^@]+}}@nofree_arg_only
104 ; CHECK-SAME: (i8* nocapture nofree [[P1:%.*]], i8* nocapture [[P2:%.*]]) {
105 ; CHECK-NEXT: tail call void @free(i8* nocapture [[P2]])
106 ; CHECK-NEXT: tail call void @nofree_func(i8* nocapture nofree [[P1]])
107 ; CHECK-NEXT: ret void
109 tail call void @free(i8* %p2)
110 tail call void @nofree_func(i8* %p1)
114 ; TEST 1 - negative, pointer freed in another function.
116 define void @test1() {
117 ; CHECK-LABEL: define {{[^@]+}}@test1() {
118 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
119 ; CHECK-NEXT: tail call void @nocapture_func_frees_pointer(i8* noalias nocapture [[TMP1]])
120 ; CHECK-NEXT: tail call void (...) @func_throws()
121 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
122 ; CHECK-NEXT: ret void
124 %1 = tail call noalias i8* @malloc(i64 4)
125 tail call void @nocapture_func_frees_pointer(i8* %1)
126 tail call void (...) @func_throws()
127 tail call void @free(i8* %1)
131 ; TEST 2 - negative, call to a sync function.
133 define void @test2() {
134 ; CHECK-LABEL: define {{[^@]+}}@test2() {
135 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
136 ; CHECK-NEXT: tail call void @sync_func(i8* [[TMP1]])
137 ; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP1]])
138 ; CHECK-NEXT: ret void
140 %1 = tail call noalias i8* @malloc(i64 4)
141 tail call void @sync_func(i8* %1)
142 tail call void @free(i8* %1)
146 ; TEST 3 - 1 malloc, 1 free
148 define void @test3() {
149 ; IS________OPM-LABEL: define {{[^@]+}}@test3() {
150 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
151 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
152 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
153 ; IS________OPM-NEXT: ret void
155 ; IS________NPM-LABEL: define {{[^@]+}}@test3() {
156 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
157 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
158 ; IS________NPM-NEXT: ret void
160 %1 = tail call noalias i8* @malloc(i64 4)
161 tail call void @no_sync_func(i8* %1)
162 tail call void @free(i8* %1)
166 define void @test3a(i8* %p) {
167 ; IS________OPM-LABEL: define {{[^@]+}}@test3a
168 ; IS________OPM-SAME: (i8* nocapture [[P:%.*]]) {
169 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
170 ; IS________OPM-NEXT: tail call void @nofree_arg_only(i8* nocapture nofree [[TMP1]], i8* nocapture [[P]])
171 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
172 ; IS________OPM-NEXT: ret void
174 ; IS________NPM-LABEL: define {{[^@]+}}@test3a
175 ; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
176 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
177 ; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
178 ; IS________NPM-NEXT: ret void
180 %1 = tail call noalias i8* @malloc(i64 4)
181 tail call void @nofree_arg_only(i8* %1, i8* %p)
182 tail call void @free(i8* %1)
186 declare noalias i8* @aligned_alloc(i64, i64)
188 define void @test3b(i8* %p) {
189 ; IS________OPM-LABEL: define {{[^@]+}}@test3b
190 ; IS________OPM-SAME: (i8* nocapture [[P:%.*]]) {
191 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 noundef 32, i64 noundef 128)
192 ; IS________OPM-NEXT: tail call void @nofree_arg_only(i8* nocapture nofree [[TMP1]], i8* nocapture [[P]])
193 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
194 ; IS________OPM-NEXT: ret void
196 ; IS________NPM-LABEL: define {{[^@]+}}@test3b
197 ; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
198 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 128, align 32
199 ; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
200 ; IS________NPM-NEXT: ret void
202 %1 = tail call noalias i8* @aligned_alloc(i64 32, i64 128)
203 tail call void @nofree_arg_only(i8* %1, i8* %p)
204 tail call void @free(i8* %1)
208 ; leave alone non-constant alignments.
209 define void @test3c(i64 %alignment) {
210 ; CHECK-LABEL: define {{[^@]+}}@test3c
211 ; CHECK-SAME: (i64 [[ALIGNMENT:%.*]]) {
212 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 [[ALIGNMENT]], i64 noundef 128)
213 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
214 ; CHECK-NEXT: ret void
216 %1 = tail call noalias i8* @aligned_alloc(i64 %alignment, i64 128)
217 tail call void @free(i8* %1)
221 declare noalias i8* @calloc(i64, i64)
223 define void @test0() {
224 ; IS________OPM-LABEL: define {{[^@]+}}@test0() {
225 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 noundef 2, i64 noundef 4)
226 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
227 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
228 ; IS________OPM-NEXT: ret void
230 ; IS________NPM-LABEL: define {{[^@]+}}@test0() {
231 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 8, align 1
232 ; IS________NPM-NEXT: [[CALLOC_BC:%.*]] = bitcast i8* [[TMP1]] to i8*
233 ; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALLOC_BC]], i8 0, i64 8, i1 false)
234 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
235 ; IS________NPM-NEXT: ret void
237 %1 = tail call noalias i8* @calloc(i64 2, i64 4)
238 tail call void @no_sync_func(i8* %1)
239 tail call void @free(i8* %1)
244 define void @test4() {
245 ; IS________OPM-LABEL: define {{[^@]+}}@test4() {
246 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
247 ; IS________OPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP1]])
248 ; IS________OPM-NEXT: ret void
250 ; IS________NPM-LABEL: define {{[^@]+}}@test4() {
251 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
252 ; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP1]])
253 ; IS________NPM-NEXT: ret void
255 %1 = tail call noalias i8* @malloc(i64 4)
256 tail call void @nofree_func(i8* %1)
260 ; TEST 5 - not all exit paths have a call to free, but all uses of malloc
261 ; are in nofree functions and are not captured
263 define void @test5(i32, i8* %p) {
264 ; IS________OPM-LABEL: define {{[^@]+}}@test5
265 ; IS________OPM-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
266 ; IS________OPM-NEXT: [[TMP2:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
267 ; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
268 ; IS________OPM-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
270 ; IS________OPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
271 ; IS________OPM-NEXT: br label [[TMP6:%.*]]
273 ; IS________OPM-NEXT: tail call void @nofree_arg_only(i8* nocapture nofree [[TMP2]], i8* nocapture [[P]])
274 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP2]])
275 ; IS________OPM-NEXT: br label [[TMP6]]
277 ; IS________OPM-NEXT: ret void
279 ; IS________NPM-LABEL: define {{[^@]+}}@test5
280 ; IS________NPM-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
281 ; IS________NPM-NEXT: [[TMP2:%.*]] = alloca i8, i64 4, align 1
282 ; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
283 ; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
285 ; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
286 ; IS________NPM-NEXT: br label [[TMP6:%.*]]
288 ; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP2]], i8* nocapture [[P]])
289 ; IS________NPM-NEXT: br label [[TMP6]]
291 ; IS________NPM-NEXT: ret void
293 %2 = tail call noalias i8* @malloc(i64 4)
294 %3 = icmp eq i32 %0, 0
295 br i1 %3, label %5, label %4
298 tail call void @nofree_func(i8* %2)
302 tail call void @nofree_arg_only(i8* %2, i8* %p)
303 tail call void @free(i8* %2)
310 ; TEST 6 - all exit paths have a call to free
312 define void @test6(i32) {
313 ; IS________OPM-LABEL: define {{[^@]+}}@test6
314 ; IS________OPM-SAME: (i32 [[TMP0:%.*]]) {
315 ; IS________OPM-NEXT: [[TMP2:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
316 ; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
317 ; IS________OPM-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
319 ; IS________OPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
320 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP2]])
321 ; IS________OPM-NEXT: br label [[TMP6:%.*]]
323 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP2]])
324 ; IS________OPM-NEXT: br label [[TMP6]]
326 ; IS________OPM-NEXT: ret void
328 ; IS________NPM-LABEL: define {{[^@]+}}@test6
329 ; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
330 ; IS________NPM-NEXT: [[TMP2:%.*]] = alloca i8, i64 4, align 1
331 ; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
332 ; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
334 ; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
335 ; IS________NPM-NEXT: br label [[TMP6:%.*]]
337 ; IS________NPM-NEXT: br label [[TMP6]]
339 ; IS________NPM-NEXT: ret void
341 %2 = tail call noalias i8* @malloc(i64 4)
342 %3 = icmp eq i32 %0, 0
343 br i1 %3, label %5, label %4
346 tail call void @nofree_func(i8* %2)
347 tail call void @free(i8* %2)
351 tail call void @free(i8* %2)
358 ; TEST 7 - free is dead.
360 define void @test7() {
361 ; IS________OPM: Function Attrs: noreturn
362 ; IS________OPM-LABEL: define {{[^@]+}}@test7
363 ; IS________OPM-SAME: () #[[ATTR3:[0-9]+]] {
364 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
365 ; IS________OPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() #[[ATTR3]]
366 ; IS________OPM-NEXT: unreachable
368 ; IS________NPM: Function Attrs: noreturn
369 ; IS________NPM-LABEL: define {{[^@]+}}@test7
370 ; IS________NPM-SAME: () #[[ATTR3:[0-9]+]] {
371 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
372 ; IS________NPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() #[[ATTR3]]
373 ; IS________NPM-NEXT: unreachable
375 %1 = tail call noalias i8* @malloc(i64 4)
376 tail call i32 @no_return_call()
377 tail call void @free(i8* %1)
381 ; TEST 8 - Negative: bitcast pointer used in capture function
383 define void @test8() {
384 ; CHECK-LABEL: define {{[^@]+}}@test8() {
385 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
386 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
387 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
388 ; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
389 ; CHECK-NEXT: tail call void @foo(i32* noundef align 4 [[TMP2]])
390 ; CHECK-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
391 ; CHECK-NEXT: ret void
393 %1 = tail call noalias i8* @malloc(i64 4)
394 tail call void @no_sync_func(i8* %1)
395 %2 = bitcast i8* %1 to i32*
396 store i32 10, i32* %2
397 %3 = load i32, i32* %2
398 tail call void @foo(i32* %2)
399 tail call void @free(i8* %1)
403 ; TEST 9 - FIXME: malloc should be converted.
404 define void @test9() {
405 ; IS________OPM-LABEL: define {{[^@]+}}@test9() {
406 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
407 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
408 ; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
409 ; IS________OPM-NEXT: store i32 10, i32* [[TMP2]], align 4
410 ; IS________OPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) #[[ATTR5]]
411 ; IS________OPM-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
412 ; IS________OPM-NEXT: ret void
414 ; IS________NPM-LABEL: define {{[^@]+}}@test9() {
415 ; IS________NPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
416 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
417 ; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
418 ; IS________NPM-NEXT: store i32 10, i32* [[TMP2]], align 4
419 ; IS________NPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) #[[ATTR6]]
420 ; IS________NPM-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
421 ; IS________NPM-NEXT: ret void
423 %1 = tail call noalias i8* @malloc(i64 4)
424 tail call void @no_sync_func(i8* %1)
425 %2 = bitcast i8* %1 to i32*
426 store i32 10, i32* %2
427 %3 = load i32, i32* %2
428 tail call void @foo_nounw(i32* %2)
429 tail call void @free(i8* %1)
433 ; TEST 10 - 1 malloc, 1 free
435 define i32 @test10() {
436 ; IS________OPM-LABEL: define {{[^@]+}}@test10() {
437 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
438 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
439 ; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
440 ; IS________OPM-NEXT: store i32 10, i32* [[TMP2]], align 4
441 ; IS________OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
442 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
443 ; IS________OPM-NEXT: ret i32 [[TMP3]]
445 ; IS________NPM-LABEL: define {{[^@]+}}@test10() {
446 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
447 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
448 ; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
449 ; IS________NPM-NEXT: store i32 10, i32* [[TMP2]], align 4
450 ; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
451 ; IS________NPM-NEXT: ret i32 [[TMP3]]
453 %1 = tail call noalias i8* @malloc(i64 4)
454 tail call void @no_sync_func(i8* %1)
455 %2 = bitcast i8* %1 to i32*
456 store i32 10, i32* %2
457 %3 = load i32, i32* %2
458 tail call void @free(i8* %1)
462 define i32 @test_lifetime() {
463 ; IS________OPM-LABEL: define {{[^@]+}}@test_lifetime() {
464 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
465 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
466 ; IS________OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
467 ; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
468 ; IS________OPM-NEXT: store i32 10, i32* [[TMP2]], align 4
469 ; IS________OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
470 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
471 ; IS________OPM-NEXT: ret i32 [[TMP3]]
473 ; IS________NPM-LABEL: define {{[^@]+}}@test_lifetime() {
474 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
475 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
476 ; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
477 ; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
478 ; IS________NPM-NEXT: store i32 10, i32* [[TMP2]], align 4
479 ; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
480 ; IS________NPM-NEXT: ret i32 [[TMP3]]
482 %1 = tail call noalias i8* @malloc(i64 4)
483 tail call void @no_sync_func(i8* %1)
484 call void @llvm.lifetime.start.p0i8(i64 4, i8* %1)
485 %2 = bitcast i8* %1 to i32*
486 store i32 10, i32* %2
487 %3 = load i32, i32* %2
488 tail call void @free(i8* %1)
494 define void @test11() {
495 ; IS________OPM-LABEL: define {{[^@]+}}@test11() {
496 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
497 ; IS________OPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) #[[ATTR5]]
498 ; IS________OPM-NEXT: tail call void @free(i8* nocapture [[TMP1]])
499 ; IS________OPM-NEXT: ret void
501 ; IS________NPM-LABEL: define {{[^@]+}}@test11() {
502 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
503 ; IS________NPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) #[[ATTR6]]
504 ; IS________NPM-NEXT: ret void
506 %1 = tail call noalias i8* @malloc(i64 4)
507 tail call void @sync_will_return(i8* %1)
508 tail call void @free(i8* %1)
513 define i32 @irreducible_cfg(i32 %0) {
514 ; IS________OPM-LABEL: define {{[^@]+}}@irreducible_cfg
515 ; IS________OPM-SAME: (i32 [[TMP0:%.*]]) {
516 ; IS________OPM-NEXT: [[TMP2:%.*]] = call noalias i8* @malloc(i64 noundef 4)
517 ; IS________OPM-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
518 ; IS________OPM-NEXT: store i32 10, i32* [[TMP3]], align 4
519 ; IS________OPM-NEXT: [[TMP4:%.*]] = icmp eq i32 [[TMP0]], 1
520 ; IS________OPM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP7:%.*]]
522 ; IS________OPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], 5
523 ; IS________OPM-NEXT: br label [[TMP13:%.*]]
525 ; IS________OPM-NEXT: br label [[TMP8:%.*]]
527 ; IS________OPM-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP14:%.*]], [[TMP13]] ], [ 1, [[TMP7]] ]
528 ; IS________OPM-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP3]], align 4
529 ; IS________OPM-NEXT: [[TMP10:%.*]] = add nsw i32 [[TMP9]], -1
530 ; IS________OPM-NEXT: store i32 [[TMP10]], i32* [[TMP3]], align 4
531 ; IS________OPM-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP9]], 0
532 ; IS________OPM-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP15:%.*]]
534 ; IS________OPM-NEXT: br label [[TMP13]]
536 ; IS________OPM-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP6]], [[TMP5]] ], [ [[DOT0]], [[TMP12]] ]
537 ; IS________OPM-NEXT: [[TMP14]] = add nsw i32 [[DOT1]], 1
538 ; IS________OPM-NEXT: br label [[TMP8]]
540 ; IS________OPM-NEXT: [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
541 ; IS________OPM-NEXT: [[TMP17:%.*]] = bitcast i32* [[TMP3]] to i8*
542 ; IS________OPM-NEXT: call void @free(i8* nocapture noundef [[TMP17]])
543 ; IS________OPM-NEXT: [[TMP18:%.*]] = load i32, i32* [[TMP3]], align 4
544 ; IS________OPM-NEXT: ret i32 [[TMP18]]
546 ; IS________NPM-LABEL: define {{[^@]+}}@irreducible_cfg
547 ; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
548 ; IS________NPM-NEXT: [[TMP2:%.*]] = alloca i8, i64 4, align 1
549 ; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
550 ; IS________NPM-NEXT: store i32 10, i32* [[TMP3]], align 4
551 ; IS________NPM-NEXT: [[TMP4:%.*]] = icmp eq i32 [[TMP0]], 1
552 ; IS________NPM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP7:%.*]]
554 ; IS________NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], 5
555 ; IS________NPM-NEXT: br label [[TMP13:%.*]]
557 ; IS________NPM-NEXT: br label [[TMP8:%.*]]
559 ; IS________NPM-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP14:%.*]], [[TMP13]] ], [ 1, [[TMP7]] ]
560 ; IS________NPM-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP3]], align 4
561 ; IS________NPM-NEXT: [[TMP10:%.*]] = add nsw i32 [[TMP9]], -1
562 ; IS________NPM-NEXT: store i32 [[TMP10]], i32* [[TMP3]], align 4
563 ; IS________NPM-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP9]], 0
564 ; IS________NPM-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP15:%.*]]
566 ; IS________NPM-NEXT: br label [[TMP13]]
568 ; IS________NPM-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP6]], [[TMP5]] ], [ [[DOT0]], [[TMP12]] ]
569 ; IS________NPM-NEXT: [[TMP14]] = add nsw i32 [[DOT1]], 1
570 ; IS________NPM-NEXT: br label [[TMP8]]
572 ; IS________NPM-NEXT: [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
573 ; IS________NPM-NEXT: ret i32 [[TMP16]]
575 %2 = call noalias i8* @malloc(i64 4)
576 %3 = bitcast i8* %2 to i32*
577 store i32 10, i32* %3, align 4
578 %4 = icmp eq i32 %0, 1
579 br i1 %4, label %5, label %7
582 %6 = add nsw i32 %0, 5
589 %.0 = phi i32 [ %14, %13 ], [ 1, %7 ]
590 %9 = load i32, i32* %3, align 4
591 %10 = add nsw i32 %9, -1
592 store i32 %10, i32* %3, align 4
593 %11 = icmp ne i32 %9, 0
594 br i1 %11, label %12, label %15
599 13: ; preds = %12, %5
600 %.1 = phi i32 [ %6, %5 ], [ %.0, %12 ]
601 %14 = add nsw i32 %.1, 1
605 %16 = load i32, i32* %3, align 4
606 %17 = bitcast i32* %3 to i8*
607 call void @free(i8* %17)
608 %18 = load i32, i32* %3, align 4
613 define i32 @malloc_in_loop(i32 %0) {
614 ; IS________OPM-LABEL: define {{[^@]+}}@malloc_in_loop
615 ; IS________OPM-SAME: (i32 [[TMP0:%.*]]) {
616 ; IS________OPM-NEXT: [[TMP2:%.*]] = alloca i32, align 4
617 ; IS________OPM-NEXT: [[TMP3:%.*]] = alloca i32*, align 8
618 ; IS________OPM-NEXT: store i32 [[TMP0]], i32* [[TMP2]], align 4
619 ; IS________OPM-NEXT: br label [[TMP4:%.*]]
621 ; IS________OPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP2]], align 4
622 ; IS________OPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP5]], -1
623 ; IS________OPM-NEXT: store i32 [[TMP6]], i32* [[TMP2]], align 4
624 ; IS________OPM-NEXT: [[TMP7:%.*]] = icmp sgt i32 [[TMP6]], 0
625 ; IS________OPM-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP11:%.*]]
627 ; IS________OPM-NEXT: [[TMP9:%.*]] = call noalias i8* @malloc(i64 noundef 4)
628 ; IS________OPM-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to i32*
629 ; IS________OPM-NEXT: store i32 1, i32* [[TMP10]], align 8
630 ; IS________OPM-NEXT: br label [[TMP4]]
632 ; IS________OPM-NEXT: ret i32 5
634 ; IS________NPM-LABEL: define {{[^@]+}}@malloc_in_loop
635 ; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
636 ; IS________NPM-NEXT: [[TMP2:%.*]] = alloca i32, align 4
637 ; IS________NPM-NEXT: [[TMP3:%.*]] = alloca i32*, align 8
638 ; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[TMP2]], align 4
639 ; IS________NPM-NEXT: br label [[TMP4:%.*]]
641 ; IS________NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP2]], align 4
642 ; IS________NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP5]], -1
643 ; IS________NPM-NEXT: store i32 [[TMP6]], i32* [[TMP2]], align 4
644 ; IS________NPM-NEXT: [[TMP7:%.*]] = icmp sgt i32 [[TMP6]], 0
645 ; IS________NPM-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP11:%.*]]
647 ; IS________NPM-NEXT: [[TMP9:%.*]] = alloca i8, i64 4, align 1
648 ; IS________NPM-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to i32*
649 ; IS________NPM-NEXT: store i32 1, i32* [[TMP10]], align 8
650 ; IS________NPM-NEXT: br label [[TMP4]]
652 ; IS________NPM-NEXT: ret i32 5
654 %2 = alloca i32, align 4
655 %3 = alloca i32*, align 8
656 store i32 %0, i32* %2, align 4
660 %5 = load i32, i32* %2, align 4
661 %6 = add nsw i32 %5, -1
662 store i32 %6, i32* %2, align 4
663 %7 = icmp sgt i32 %6, 0
664 br i1 %7, label %8, label %11
667 %9 = call noalias i8* @malloc(i64 4)
668 %10 = bitcast i8* %9 to i32*
669 store i32 1, i32* %10, align 8
676 ; Malloc/Calloc too large
677 define i32 @test13() {
678 ; CHECK-LABEL: define {{[^@]+}}@test13() {
679 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 256)
680 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
681 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
682 ; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
683 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
684 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
685 ; CHECK-NEXT: ret i32 [[TMP3]]
687 %1 = tail call noalias i8* @malloc(i64 256)
688 tail call void @no_sync_func(i8* %1)
689 %2 = bitcast i8* %1 to i32*
690 store i32 10, i32* %2
691 %3 = load i32, i32* %2
692 tail call void @free(i8* %1)
696 define i32 @test_sle() {
697 ; CHECK-LABEL: define {{[^@]+}}@test_sle() {
698 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef -1)
699 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
700 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
701 ; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
702 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
703 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
704 ; CHECK-NEXT: ret i32 [[TMP3]]
706 %1 = tail call noalias i8* @malloc(i64 -1)
707 tail call void @no_sync_func(i8* %1)
708 %2 = bitcast i8* %1 to i32*
709 store i32 10, i32* %2
710 %3 = load i32, i32* %2
711 tail call void @free(i8* %1)
715 define i32 @test_overflow() {
716 ; CHECK-LABEL: define {{[^@]+}}@test_overflow() {
717 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 noundef 65537, i64 noundef 65537)
718 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
719 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
720 ; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
721 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
722 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
723 ; CHECK-NEXT: ret i32 [[TMP3]]
725 %1 = tail call noalias i8* @calloc(i64 65537, i64 65537)
726 tail call void @no_sync_func(i8* %1)
727 %2 = bitcast i8* %1 to i32*
728 store i32 10, i32* %2
729 %3 = load i32, i32* %2
730 tail call void @free(i8* %1)
734 define void @test14() {
735 ; CHECK-LABEL: define {{[^@]+}}@test14() {
736 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @calloc(i64 noundef 64, i64 noundef 4)
737 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
738 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
739 ; CHECK-NEXT: ret void
741 %1 = tail call noalias i8* @calloc(i64 64, i64 4)
742 tail call void @no_sync_func(i8* %1)
743 tail call void @free(i8* %1)
747 define void @test15(i64 %S) {
748 ; CHECK-LABEL: define {{[^@]+}}@test15
749 ; CHECK-SAME: (i64 [[S:%.*]]) {
750 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 [[S]])
751 ; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]])
752 ; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
753 ; CHECK-NEXT: ret void
755 %1 = tail call noalias i8* @malloc(i64 %S)
756 tail call void @no_sync_func(i8* %1)
757 tail call void @free(i8* %1)
761 define void @test16a(i8 %v, i8** %P) {
762 ; IS________OPM-LABEL: define {{[^@]+}}@test16a
763 ; IS________OPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree readnone [[P:%.*]]) {
764 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
765 ; IS________OPM-NEXT: store i8 [[V]], i8* [[TMP1]], align 1
766 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[TMP1]])
767 ; IS________OPM-NEXT: tail call void @free(i8* noalias nocapture noundef nonnull dereferenceable(1) [[TMP1]])
768 ; IS________OPM-NEXT: ret void
770 ; IS________NPM-LABEL: define {{[^@]+}}@test16a
771 ; IS________NPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree readnone [[P:%.*]]) {
772 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
773 ; IS________NPM-NEXT: store i8 [[V]], i8* [[TMP1]], align 1
774 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[TMP1]])
775 ; IS________NPM-NEXT: ret void
777 %1 = tail call noalias i8* @malloc(i64 4)
779 tail call void @no_sync_func(i8* %1)
780 tail call void @free(i8* nonnull dereferenceable(1) %1)
784 define void @test16b(i8 %v, i8** %P) {
785 ; CHECK-LABEL: define {{[^@]+}}@test16b
786 ; CHECK-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
787 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
788 ; CHECK-NEXT: store i8* [[TMP1]], i8** [[P]], align 8
789 ; CHECK-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]])
790 ; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP1]])
791 ; CHECK-NEXT: ret void
793 %1 = tail call noalias i8* @malloc(i64 4)
794 store i8* %1, i8** %P
795 tail call void @no_sync_func(i8* %1)
796 tail call void @free(i8* %1)
800 define void @test16c(i8 %v, i8** %P) {
801 ; IS________OPM-LABEL: define {{[^@]+}}@test16c
802 ; IS________OPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
803 ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
804 ; IS________OPM-NEXT: store i8* [[TMP1]], i8** [[P]], align 8
805 ; IS________OPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) #[[ATTR5]]
806 ; IS________OPM-NEXT: tail call void @free(i8* nocapture [[TMP1]])
807 ; IS________OPM-NEXT: ret void
809 ; IS________NPM-LABEL: define {{[^@]+}}@test16c
810 ; IS________NPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
811 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1
812 ; IS________NPM-NEXT: store i8* [[TMP1]], i8** [[P]], align 8
813 ; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) #[[ATTR6]]
814 ; IS________NPM-NEXT: ret void
816 %1 = tail call noalias i8* @malloc(i64 4)
817 store i8* %1, i8** %P
818 tail call void @no_sync_func(i8* %1) nounwind
819 tail call void @free(i8* %1)
823 define void @test16d(i8 %v, i8** %P) {
824 ; CHECK-LABEL: define {{[^@]+}}@test16d
825 ; CHECK-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
826 ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
827 ; CHECK-NEXT: store i8* [[TMP1]], i8** [[P]], align 8
828 ; CHECK-NEXT: ret void
830 %1 = tail call noalias i8* @malloc(i64 4)
831 store i8* %1, i8** %P
835 ; IS________OPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn }
836 ; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn }
837 ; IS________OPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind }
838 ; IS________OPM: attributes #[[ATTR3]] = { noreturn }
839 ; IS________OPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
840 ; IS________OPM: attributes #[[ATTR5]] = { nounwind }
842 ; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn }
843 ; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn }
844 ; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind }
845 ; IS________NPM: attributes #[[ATTR3]] = { noreturn }
846 ; IS________NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
847 ; IS________NPM: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly }
848 ; IS________NPM: attributes #[[ATTR6]] = { nounwind }