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=34 -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=34 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
4 ; TODO: The old pass manager cgscc run is disabled as it causes a crash on windows which is under investigation: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151
5 ; 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
6 ; 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
8 ; NOT_CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)]
9 ; IS__CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)]
10 @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)]
12 declare void @no_return_call() nofree noreturn nounwind nosync
14 declare void @normal_call() readnone
18 declare i32 @foo_nounwind() nounwind
20 declare i32 @foo_noreturn_nounwind() noreturn nounwind
22 declare i32 @foo_noreturn() noreturn
24 declare i32 @bar() nosync readnone
26 ; This internal function has no live call sites, so all its BBs are considered dead,
27 ; and nothing should be deduced for it.
30 ; NOT_CGSCC_NPM: @[[DEAD_WITH_BLOCKADDRESS_USERS_L:[a-zA-Z0-9_$"\\.-]+]] = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)]
31 ; NOT_CGSCC_NPM: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
32 ; NOT_CGSCC_NPM: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
33 ; NOT_CGSCC_NPM: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
34 ; NOT_CGSCC_NPM: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0
36 ; IS__CGSCC____: @[[DEAD_WITH_BLOCKADDRESS_USERS_L:[a-zA-Z0-9_$"\\.-]+]] = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, [[LAB0:%.*]]), i8* blockaddress(@dead_with_blockaddress_users, [[END:%.*]])]
37 ; IS__CGSCC____: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
38 ; IS__CGSCC____: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
39 ; IS__CGSCC____: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
40 ; IS__CGSCC____: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0
42 define internal i32 @dead_internal_func(i32 %0) {
43 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
44 ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_internal_func
45 ; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] {
46 ; IS__CGSCC____-NEXT: br label [[TMP2:%.*]]
48 ; IS__CGSCC____-NEXT: ret i32 undef
50 ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = phi i32 [ [[TMP6:%.*]], [[TMP2]] ], [ 1, [[TMP0:%.*]] ]
51 ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = phi i32 [ [[TMP5:%.*]], [[TMP2]] ], [ 1, [[TMP0]] ]
52 ; IS__CGSCC____-NEXT: [[TMP5]] = mul nsw i32 [[TMP3]], [[TMP4]]
53 ; IS__CGSCC____-NEXT: [[TMP6]] = add nuw nsw i32 [[TMP3]], 1
54 ; IS__CGSCC____-NEXT: [[TMP7:%.*]] = icmp eq i32 [[TMP3]], 10
55 ; IS__CGSCC____-NEXT: br i1 [[TMP7]], label [[TMP1:%.*]], label [[TMP2]]
57 %2 = icmp slt i32 %0, 1
58 br i1 %2, label %3, label %5
60 ; <label>:3: ; preds = %5, %1
61 %4 = phi i32 [ 1, %1 ], [ %8, %5 ]
64 ; <label>:5: ; preds = %1, %5
65 %6 = phi i32 [ %9, %5 ], [ 1, %1 ]
66 %7 = phi i32 [ %8, %5 ], [ 1, %1 ]
67 %8 = mul nsw i32 %6, %7
68 %9 = add nuw nsw i32 %6, 1
69 %10 = icmp eq i32 %6, %0
70 br i1 %10, label %3, label %5
73 define i32 @volatile_load(i32*) norecurse nounwind uwtable {
74 ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn
75 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@volatile_load
76 ; NOT_CGSCC_NPM-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR6:[0-9]+]] {
77 ; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
78 ; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP2]]
80 ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn
81 ; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load
82 ; IS__CGSCC____-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
83 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
84 ; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
86 %2 = load volatile i32, i32* %0, align 4
90 define internal i32 @internal_load(i32*) norecurse nounwind uwtable {
91 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn
92 ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_load
93 ; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] {
94 ; IS__CGSCC____-NEXT: ret i32 undef
96 %2 = load i32, i32* %0, align 4
99 ; TEST 1: Only first block is live.
101 define i32 @first_block_no_return(i32 %a, i32* nonnull %ptr1, i32* %ptr2) #0 {
102 ; CHECK: Function Attrs: nofree noreturn nosync nounwind
103 ; CHECK-LABEL: define {{[^@]+}}@first_block_no_return
104 ; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree nonnull readnone [[PTR1:%.*]], i32* nocapture nofree readnone [[PTR2:%.*]]) #[[ATTR0:[0-9]+]] {
106 ; CHECK-NEXT: call void @no_return_call() #[[ATTR3:[0-9]+]]
107 ; CHECK-NEXT: unreachable
109 ; CHECK-NEXT: unreachable
111 ; CHECK-NEXT: unreachable
113 ; CHECK-NEXT: unreachable
116 call i32 @internal_load(i32* %ptr1)
117 call void @no_return_call()
118 call i32 @dead_internal_func(i32 10)
119 %cmp = icmp eq i32 %a, 0
120 br i1 %cmp, label %cond.true, label %cond.false
122 cond.true: ; preds = %entry
123 call i32 @internal_load(i32* %ptr2)
124 %load = call i32 @volatile_load(i32* %ptr1)
125 call void @normal_call()
126 %call = call i32 @foo()
129 cond.false: ; preds = %entry
130 call void @normal_call()
131 %call1 = call i32 @bar()
134 cond.end: ; preds = %cond.false, %cond.true
135 %cond = phi i32 [ %call, %cond.true ], [ %call1, %cond.false ]
139 ; TEST 2: cond.true is dead, but cond.end is not, since cond.false is live
141 ; This is just an example. For example we can put a sync call in a
142 ; dead block and check if it is deduced.
144 define i32 @dead_block_present(i32 %a, i32* %ptr1) #0 {
145 ; NOT_CGSCC_NPM: Function Attrs: nosync
146 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@dead_block_present
147 ; NOT_CGSCC_NPM-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR7:[0-9]+]] {
148 ; NOT_CGSCC_NPM-NEXT: entry:
149 ; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
150 ; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
151 ; NOT_CGSCC_NPM: cond.true:
152 ; NOT_CGSCC_NPM-NEXT: call void @no_return_call() #[[ATTR3]]
153 ; NOT_CGSCC_NPM-NEXT: unreachable
154 ; NOT_CGSCC_NPM: cond.false:
155 ; NOT_CGSCC_NPM-NEXT: call void @normal_call()
156 ; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @bar()
157 ; NOT_CGSCC_NPM-NEXT: br label [[COND_END:%.*]]
158 ; NOT_CGSCC_NPM: cond.end:
159 ; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL1]]
161 ; IS__CGSCC____: Function Attrs: nosync
162 ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_block_present
163 ; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR9:[0-9]+]] {
164 ; IS__CGSCC____-NEXT: entry:
165 ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
166 ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
167 ; IS__CGSCC____: cond.true:
168 ; IS__CGSCC____-NEXT: call void @no_return_call() #[[ATTR3]]
169 ; IS__CGSCC____-NEXT: unreachable
170 ; IS__CGSCC____: cond.false:
171 ; IS__CGSCC____-NEXT: call void @normal_call()
172 ; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @bar()
173 ; IS__CGSCC____-NEXT: br label [[COND_END:%.*]]
174 ; IS__CGSCC____: cond.end:
175 ; IS__CGSCC____-NEXT: ret i32 [[CALL1]]
178 %cmp = icmp eq i32 %a, 0
179 br i1 %cmp, label %cond.true, label %cond.false
181 cond.true: ; preds = %entry
182 call void @no_return_call()
183 %call = call i32 @volatile_load(i32* %ptr1)
186 cond.false: ; preds = %entry
187 call void @normal_call()
188 %call1 = call i32 @bar()
191 cond.end: ; preds = %cond.false, %cond.true
192 %cond = phi i32 [ %call, %cond.true ], [ %call1, %cond.false ]
196 ; TEST 3: both cond.true and cond.false are dead, therfore cond.end is dead as well.
198 define i32 @all_dead(i32 %a) #0 {
199 ; CHECK: Function Attrs: nofree noreturn nosync nounwind
200 ; CHECK-LABEL: define {{[^@]+}}@all_dead
201 ; CHECK-SAME: (i32 [[A:%.*]]) #[[ATTR0]] {
203 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
204 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
206 ; CHECK-NEXT: call void @no_return_call() #[[ATTR3]]
207 ; CHECK-NEXT: unreachable
209 ; CHECK-NEXT: call void @no_return_call() #[[ATTR3]]
210 ; CHECK-NEXT: unreachable
212 ; CHECK-NEXT: unreachable
215 %cmp = icmp eq i32 %a, 0
216 br i1 %cmp, label %cond.true, label %cond.false
218 cond.true: ; preds = %entry
219 call void @no_return_call()
220 call i32 @dead_internal_func(i32 10)
221 %call = call i32 @foo()
224 cond.false: ; preds = %entry
225 call void @no_return_call()
226 call i32 @dead_internal_func(i32 10)
227 %call1 = call i32 @bar()
230 cond.end: ; preds = %cond.false, %cond.true
231 %cond = phi i32 [ %call, %cond.true ], [ %call1, %cond.false ]
235 declare i32 @__gxx_personality_v0(...)
237 ; TEST 4: All blocks are live.
239 define i32 @all_live(i32 %a) #0 {
240 ; CHECK-LABEL: define {{[^@]+}}@all_live
241 ; CHECK-SAME: (i32 [[A:%.*]]) {
243 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
244 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
246 ; CHECK-NEXT: call void @normal_call()
247 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn() #[[ATTR4:[0-9]+]]
248 ; CHECK-NEXT: unreachable
250 ; CHECK-NEXT: call void @normal_call()
251 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
252 ; CHECK-NEXT: br label [[COND_END:%.*]]
254 ; CHECK-NEXT: ret i32 [[CALL1]]
257 %cmp = icmp eq i32 %a, 0
258 br i1 %cmp, label %cond.true, label %cond.false
260 cond.true: ; preds = %entry
261 call void @normal_call()
262 %call = call i32 @foo_noreturn()
265 cond.false: ; preds = %entry
266 call void @normal_call()
267 %call1 = call i32 @bar()
270 cond.end: ; preds = %cond.false, %cond.true
271 %cond = phi i32 [ %call, %cond.true ], [ %call1, %cond.false ]
275 ; TEST 5.1 noreturn invoke instruction with a unreachable normal successor block.
277 define i32 @invoke_noreturn(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
278 ; CHECK-LABEL: define {{[^@]+}}@invoke_noreturn
279 ; CHECK-SAME: (i32 [[A:%.*]]) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
281 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
282 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
284 ; CHECK-NEXT: call void @normal_call()
285 ; CHECK-NEXT: [[CALL:%.*]] = invoke i32 @foo_noreturn() #[[ATTR4]]
286 ; CHECK-NEXT: to label [[CONTINUE:%.*]] unwind label [[CLEANUP:%.*]]
288 ; CHECK-NEXT: call void @normal_call()
289 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
290 ; CHECK-NEXT: br label [[COND_END:%.*]]
292 ; CHECK-NEXT: ret i32 [[CALL1]]
294 ; CHECK-NEXT: unreachable
296 ; CHECK-NEXT: [[RES:%.*]] = landingpad { i8*, i32 }
297 ; CHECK-NEXT: catch i8* null
298 ; CHECK-NEXT: ret i32 0
301 %cmp = icmp eq i32 %a, 0
302 br i1 %cmp, label %cond.true, label %cond.false
304 cond.true: ; preds = %entry
305 call void @normal_call()
306 %call = invoke i32 @foo_noreturn() to label %continue
307 unwind label %cleanup
309 cond.false: ; preds = %entry
310 call void @normal_call()
311 %call1 = call i32 @bar()
314 cond.end: ; preds = %cond.false, %continue
315 %cond = phi i32 [ %call, %continue ], [ %call1, %cond.false ]
322 %res = landingpad { i8*, i32 }
327 ; TEST 5.2 noreturn invoke instruction replaced by a call and an unreachable instruction
330 define i32 @invoke_noreturn_nounwind(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
331 ; CHECK-LABEL: define {{[^@]+}}@invoke_noreturn_nounwind
332 ; CHECK-SAME: (i32 [[A:%.*]]) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
334 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
335 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
337 ; CHECK-NEXT: call void @normal_call()
338 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn_nounwind() #[[ATTR3]]
339 ; CHECK-NEXT: unreachable
341 ; CHECK-NEXT: call void @normal_call()
342 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
343 ; CHECK-NEXT: br label [[COND_END:%.*]]
345 ; CHECK-NEXT: ret i32 [[CALL1]]
347 ; CHECK-NEXT: unreachable
349 ; CHECK-NEXT: unreachable
352 %cmp = icmp eq i32 %a, 0
353 br i1 %cmp, label %cond.true, label %cond.false
355 cond.true: ; preds = %entry
356 call void @normal_call()
357 %call = invoke i32 @foo_noreturn_nounwind() to label %continue
358 unwind label %cleanup
361 cond.false: ; preds = %entry
362 call void @normal_call()
363 %call1 = call i32 @bar()
366 cond.end: ; preds = %cond.false, %continue
367 %cond = phi i32 [ %call, %continue ], [ %call1, %cond.false ]
374 %res = landingpad { i8*, i32 }
379 ; TEST 5.3 unounwind invoke instruction replaced by a call and a branch instruction put after it.
380 define i32 @invoke_nounwind(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
381 ; CHECK-LABEL: define {{[^@]+}}@invoke_nounwind
382 ; CHECK-SAME: (i32 [[A:%.*]]) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
384 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
385 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
387 ; CHECK-NEXT: call void @normal_call()
388 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2:[0-9]+]]
389 ; CHECK-NEXT: br label [[CONTINUE:%.*]]
391 ; CHECK-NEXT: call void @normal_call()
392 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
393 ; CHECK-NEXT: br label [[COND_END:%.*]]
395 ; CHECK-NEXT: [[COND:%.*]] = phi i32 [ [[CALL]], [[CONTINUE]] ], [ [[CALL1]], [[COND_FALSE]] ]
396 ; CHECK-NEXT: ret i32 [[COND]]
398 ; CHECK-NEXT: br label [[COND_END]]
400 ; CHECK-NEXT: unreachable
403 %cmp = icmp eq i32 %a, 0
404 br i1 %cmp, label %cond.true, label %cond.false
406 cond.true: ; preds = %entry
407 call void @normal_call()
408 %call = invoke i32 @foo_nounwind() to label %continue
409 unwind label %cleanup
411 cond.false: ; preds = %entry
412 call void @normal_call()
413 %call1 = call i32 @bar()
416 cond.end: ; preds = %cond.false, %continue
417 %cond = phi i32 [ %call, %continue ], [ %call1, %cond.false ]
424 %res = landingpad { i8*, i32 }
429 ; TEST 5.4 unounwind invoke instruction replaced by a call and a branch instruction put after it.
430 define i32 @invoke_nounwind_phi(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
431 ; CHECK-LABEL: define {{[^@]+}}@invoke_nounwind_phi
432 ; CHECK-SAME: (i32 [[A:%.*]]) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
434 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
435 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
437 ; CHECK-NEXT: call void @normal_call()
438 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]]
439 ; CHECK-NEXT: br label [[CONTINUE:%.*]]
441 ; CHECK-NEXT: call void @normal_call()
442 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
443 ; CHECK-NEXT: br label [[CONTINUE]]
445 ; CHECK-NEXT: [[P:%.*]] = phi i32 [ 0, [[COND_TRUE]] ], [ 1, [[COND_FALSE]] ]
446 ; CHECK-NEXT: ret i32 [[P]]
448 ; CHECK-NEXT: unreachable
451 %cmp = icmp eq i32 %a, 0
452 br i1 %cmp, label %cond.true, label %cond.false
454 cond.true: ; preds = %entry
455 call void @normal_call()
456 %call = invoke i32 @foo_nounwind() to label %continue
457 unwind label %cleanup
459 cond.false: ; preds = %entry
460 call void @normal_call()
461 %call1 = call i32 @bar()
465 %p = phi i32 [ 0, %cond.true ], [ 1, %cond.false ]
469 %res = landingpad { i8*, i32 } catch i8* null
473 ; TEST 5.5 unounwind invoke instruction replaced by a call and a branch instruction put after it.
474 define i32 @invoke_nounwind_phi_dom(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
475 ; CHECK-LABEL: define {{[^@]+}}@invoke_nounwind_phi_dom
476 ; CHECK-SAME: (i32 [[A:%.*]]) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
478 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
479 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
481 ; CHECK-NEXT: call void @normal_call()
482 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]]
483 ; CHECK-NEXT: br label [[CONTINUE:%.*]]
485 ; CHECK-NEXT: call void @normal_call()
486 ; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar()
487 ; CHECK-NEXT: br label [[CONTINUE]]
489 ; CHECK-NEXT: [[P:%.*]] = phi i32 [ [[CALL]], [[COND_TRUE]] ], [ [[CALL1]], [[COND_FALSE]] ]
490 ; CHECK-NEXT: ret i32 [[P]]
492 ; CHECK-NEXT: unreachable
495 %cmp = icmp eq i32 %a, 0
496 br i1 %cmp, label %cond.true, label %cond.false
498 cond.true: ; preds = %entry
499 call void @normal_call()
500 %call = invoke i32 @foo_nounwind() to label %continue
501 unwind label %cleanup
503 cond.false: ; preds = %entry
504 call void @normal_call()
505 %call1 = call i32 @bar()
509 %p = phi i32 [ %call, %cond.true ], [ %call1, %cond.false ]
513 %res = landingpad { i8*, i32 } catch i8* null
517 ; TEST 6: Undefined behvior, taken from LangRef.
518 ; FIXME: Should be able to detect undefined behavior.
520 define void @ub(i32* %0) {
521 ; IS________OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
522 ; IS________OPM-LABEL: define {{[^@]+}}@ub
523 ; IS________OPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] {
524 ; IS________OPM-NEXT: store i32 0, i32* [[TMP0]], align 4
525 ; IS________OPM-NEXT: ret void
527 ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
528 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ub
529 ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] {
530 ; IS__TUNIT_NPM-NEXT: store i32 0, i32* undef, align 536870912
531 ; IS__TUNIT_NPM-NEXT: ret void
533 ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
534 ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub
535 ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] {
536 ; IS__CGSCC____-NEXT: store i32 0, i32* undef, align 536870912
537 ; IS__CGSCC____-NEXT: ret void
539 %poison = sub nuw i32 0, 1 ; Results in a poison value.
540 %still_poison = and i32 %poison, 0 ; 0, but also poison.
541 %poison_yet_again = getelementptr i32, i32* %0, i32 %still_poison
542 store i32 0, i32* %poison_yet_again ; Undefined behavior due to store to poison.
546 define void @inf_loop() #0 {
547 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone
548 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@inf_loop
549 ; NOT_CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] {
550 ; NOT_CGSCC_NPM-NEXT: entry:
551 ; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY:%.*]]
552 ; NOT_CGSCC_NPM: while.body:
553 ; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY]]
555 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
556 ; IS__CGSCC____-LABEL: define {{[^@]+}}@inf_loop
557 ; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] {
558 ; IS__CGSCC____-NEXT: entry:
559 ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]]
560 ; IS__CGSCC____: while.body:
561 ; IS__CGSCC____-NEXT: br label [[WHILE_BODY]]
566 while.body: ; preds = %entry, %while.body
570 ; TEST 7: Infinite loop.
571 ; FIXME: Detect infloops, and mark affected blocks dead.
573 define i32 @test5(i32, i32) #0 {
574 ; CHECK: Function Attrs: nosync readnone
575 ; CHECK-LABEL: define {{[^@]+}}@test5
576 ; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
577 ; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], [[TMP1]]
578 ; CHECK-NEXT: br i1 [[TMP3]], label [[COND_IF:%.*]], label [[COND_ELSEIF:%.*]]
580 ; CHECK-NEXT: [[TMP4:%.*]] = tail call i32 @bar()
581 ; CHECK-NEXT: br label [[COND_END:%.*]]
582 ; CHECK: cond.elseif:
583 ; CHECK-NEXT: unreachable
585 ; CHECK-NEXT: unreachable
587 ; CHECK-NEXT: ret i32 0
589 %3 = icmp sgt i32 %0, %1
590 br i1 %3, label %cond.if, label %cond.elseif
592 cond.if: ; preds = %2
593 %4 = tail call i32 @bar()
596 cond.elseif: ; preds = %2
597 call void @inf_loop()
598 %5 = icmp slt i32 %0, %1
599 br i1 %5, label %cond.end, label %cond.else
601 cond.else: ; preds = %cond.elseif
602 %6 = tail call i32 @foo()
605 cond.end: ; preds = %cond.if, %cond.else, %cond.elseif
606 %7 = phi i32 [ %1, %cond.elseif ], [ 0, %cond.else ], [ 0, %cond.if ]
610 define void @rec() #0 {
611 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
612 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@rec
613 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10:[0-9]+]] {
614 ; NOT_CGSCC_NPM-NEXT: entry:
615 ; NOT_CGSCC_NPM-NEXT: unreachable
617 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
618 ; IS__CGSCC____-LABEL: define {{[^@]+}}@rec
619 ; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] {
620 ; IS__CGSCC____-NEXT: entry:
621 ; IS__CGSCC____-NEXT: unreachable
629 ; FIXME: everything after first block should be marked dead
630 ; and unreachable should be put after call to @rec().
632 define i32 @test6(i32, i32) #0 {
633 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
634 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6
635 ; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR10]] {
636 ; NOT_CGSCC_NPM-NEXT: unreachable
637 ; NOT_CGSCC_NPM: cond.if:
638 ; NOT_CGSCC_NPM-NEXT: unreachable
639 ; NOT_CGSCC_NPM: cond.elseif:
640 ; NOT_CGSCC_NPM-NEXT: unreachable
641 ; NOT_CGSCC_NPM: cond.else:
642 ; NOT_CGSCC_NPM-NEXT: unreachable
643 ; NOT_CGSCC_NPM: cond.end:
644 ; NOT_CGSCC_NPM-NEXT: unreachable
646 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
647 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test6
648 ; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR12]] {
649 ; IS__CGSCC____-NEXT: unreachable
650 ; IS__CGSCC____: cond.if:
651 ; IS__CGSCC____-NEXT: unreachable
652 ; IS__CGSCC____: cond.elseif:
653 ; IS__CGSCC____-NEXT: unreachable
654 ; IS__CGSCC____: cond.else:
655 ; IS__CGSCC____-NEXT: unreachable
656 ; IS__CGSCC____: cond.end:
657 ; IS__CGSCC____-NEXT: unreachable
660 %3 = icmp sgt i32 %0, %1
661 br i1 %3, label %cond.if, label %cond.elseif
663 cond.if: ; preds = %2
664 %4 = tail call i32 @bar()
667 cond.elseif: ; preds = %2
669 %5 = icmp slt i32 %0, %1
670 br i1 %5, label %cond.end, label %cond.else
672 cond.else: ; preds = %cond.elseif
673 %6 = tail call i32 @foo()
676 cond.end: ; preds = %cond.if, %cond.else, %cond.elseif
677 %7 = phi i32 [ %1, %cond.elseif ], [ 0, %cond.else ], [ 0, %cond.if ]
681 ; FIXME: contains recursive call to itself in cond.elseif block
683 define i32 @test7(i32, i32) #0 {
684 ; CHECK-LABEL: define {{[^@]+}}@test7
685 ; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
686 ; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], [[TMP1]]
687 ; CHECK-NEXT: br i1 [[TMP3]], label [[COND_IF:%.*]], label [[COND_ELSEIF:%.*]]
689 ; CHECK-NEXT: [[TMP4:%.*]] = tail call i32 @bar()
690 ; CHECK-NEXT: br label [[COND_END:%.*]]
691 ; CHECK: cond.elseif:
692 ; CHECK-NEXT: [[TMP5:%.*]] = tail call i32 @test7(i32 [[TMP0]], i32 [[TMP1]])
693 ; CHECK-NEXT: [[TMP6:%.*]] = icmp slt i32 [[TMP0]], [[TMP1]]
694 ; CHECK-NEXT: br i1 [[TMP6]], label [[COND_END]], label [[COND_ELSE:%.*]]
696 ; CHECK-NEXT: [[TMP7:%.*]] = tail call i32 @foo()
697 ; CHECK-NEXT: br label [[COND_END]]
699 ; CHECK-NEXT: [[TMP8:%.*]] = phi i32 [ [[TMP1]], [[COND_ELSEIF]] ], [ 0, [[COND_ELSE]] ], [ 0, [[COND_IF]] ]
700 ; CHECK-NEXT: ret i32 [[TMP8]]
702 %3 = icmp sgt i32 %0, %1
703 br i1 %3, label %cond.if, label %cond.elseif
705 cond.if: ; preds = %2
706 %4 = tail call i32 @bar()
709 cond.elseif: ; preds = %2
710 %5 = tail call i32 @test7(i32 %0, i32 %1)
711 %6 = icmp slt i32 %0, %1
712 br i1 %6, label %cond.end, label %cond.else
714 cond.else: ; preds = %cond.elseif
715 %7 = tail call i32 @foo()
718 cond.end: ; preds = %cond.if, %cond.else, %cond.elseif
719 %8 = phi i32 [ %1, %cond.elseif ], [ 0, %cond.else ], [ 0, %cond.if ]
725 ; char a1 __attribute__((aligned(8)));
726 ; char a2 __attribute__((aligned(16)));
728 ; char* f1(char* a ){
729 ; return a?a:f2(&a1);
732 ; return a?f1(a):f3(&a2);
736 ; return a?&a1: f1(&a2);
739 @a1 = common global i8 0, align 8
740 @a2 = common global i8 0, align 16
742 define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 {
743 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
744 ; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
745 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
746 ; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
748 ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f2(i8* nonnull @a1)
749 ; IS__CGSCC____-NEXT: br label [[TMP5]]
751 ; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
752 ; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
754 %2 = icmp eq i8* %0, null
755 br i1 %2, label %3, label %5
757 ; <label>:3: ; preds = %1
758 %4 = tail call i8* @f2(i8* nonnull @a1)
761 ; <label>:5: ; preds = %1, %3
762 %6 = phi i8* [ %4, %3 ], [ %0, %1 ]
766 define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 {
767 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f2
768 ; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
769 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
770 ; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
772 ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull [[TMP0]])
773 ; IS__CGSCC____-NEXT: br label [[TMP7:%.*]]
775 ; IS__CGSCC____-NEXT: [[TMP6:%.*]] = tail call i8* @f3(i8* nonnull @a2)
776 ; IS__CGSCC____-NEXT: br label [[TMP7]]
778 ; IS__CGSCC____-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
779 ; IS__CGSCC____-NEXT: ret i8* [[TMP8]]
781 %2 = icmp eq i8* %0, null
782 br i1 %2, label %5, label %3
784 ; <label>:3: ; preds = %1
786 %4 = tail call i8* @f1(i8* nonnull %0)
789 ; <label>:5: ; preds = %1
790 %6 = tail call i8* @f3(i8* nonnull @a2)
793 ; <label>:7: ; preds = %5, %3
794 %8 = phi i8* [ %4, %3 ], [ %6, %5 ]
798 define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
799 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f3
800 ; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
801 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
802 ; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
804 ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull @a2)
805 ; IS__CGSCC____-NEXT: br label [[TMP5]]
807 ; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
808 ; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
810 %2 = icmp eq i8* %0, null
811 br i1 %2, label %3, label %5
813 ; <label>:3: ; preds = %1
814 %4 = tail call i8* @f1(i8* nonnull @a2)
817 ; <label>:5: ; preds = %1, %3
818 %6 = phi i8* [ %4, %3 ], [ @a1, %1 ]
822 declare void @sink() nofree nosync nounwind willreturn
823 define void @test_unreachable() {
824 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind
825 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test_unreachable
826 ; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] {
827 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14:[0-9]+]]
828 ; NOT_CGSCC_NPM-NEXT: call void @test_unreachable() #[[ATTR0]]
829 ; NOT_CGSCC_NPM-NEXT: unreachable
831 ; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind
832 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_unreachable
833 ; IS__CGSCC____-SAME: () #[[ATTR0]] {
834 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17:[0-9]+]]
835 ; IS__CGSCC____-NEXT: call void @test_unreachable() #[[ATTR0]]
836 ; IS__CGSCC____-NEXT: unreachable
839 call void @test_unreachable()
843 define linkonce_odr void @non_exact1() {
844 ; CHECK-LABEL: define {{[^@]+}}@non_exact1() {
845 ; CHECK-NEXT: call void @non_dead_a0() #[[ATTR2]]
846 ; CHECK-NEXT: call void @non_dead_a1() #[[ATTR2]]
847 ; CHECK-NEXT: call void @non_dead_a2() #[[ATTR2]]
848 ; CHECK-NEXT: call void @non_dead_a3() #[[ATTR2]]
849 ; CHECK-NEXT: call void @non_dead_a4() #[[ATTR2]]
850 ; CHECK-NEXT: call void @non_dead_a5() #[[ATTR2]]
851 ; CHECK-NEXT: call void @non_dead_a6() #[[ATTR2]]
852 ; CHECK-NEXT: call void @non_dead_a7() #[[ATTR2]]
853 ; CHECK-NEXT: call void @non_dead_a8() #[[ATTR2]]
854 ; CHECK-NEXT: call void @non_dead_a9() #[[ATTR2]]
855 ; CHECK-NEXT: call void @non_dead_a10() #[[ATTR2]]
856 ; CHECK-NEXT: call void @non_dead_a11() #[[ATTR2]]
857 ; CHECK-NEXT: call void @non_dead_a12() #[[ATTR2]]
858 ; CHECK-NEXT: call void @non_dead_a13() #[[ATTR2]]
859 ; CHECK-NEXT: call void @non_dead_a14() #[[ATTR2]]
860 ; CHECK-NEXT: call void @non_dead_a15() #[[ATTR2]]
861 ; CHECK-NEXT: call void @middle()
862 ; CHECK-NEXT: ret void
864 call void @non_dead_a0()
865 call void @non_dead_a1()
866 call void @non_dead_a2()
867 call void @non_dead_a3()
868 call void @non_dead_a4()
869 call void @non_dead_a5()
870 call void @non_dead_a6()
871 call void @non_dead_a7()
872 call void @non_dead_a8()
873 call void @non_dead_a9()
874 call void @non_dead_a10()
875 call void @non_dead_a11()
876 call void @non_dead_a12()
877 call void @non_dead_a13()
878 call void @non_dead_a14()
879 call void @non_dead_a15()
883 define internal void @middle() {
884 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@middle() {
885 ; NOT_CGSCC_NPM-NEXT: bb0:
886 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() #[[ATTR11:[0-9]+]]
887 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() #[[ATTR11]]
888 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() #[[ATTR11]]
889 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() #[[ATTR11]]
890 ; NOT_CGSCC_NPM-NEXT: br label [[BB1:%.*]]
891 ; NOT_CGSCC_NPM: bb1:
892 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() #[[ATTR11]]
893 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() #[[ATTR11]]
894 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() #[[ATTR11]]
895 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() #[[ATTR11]]
896 ; NOT_CGSCC_NPM-NEXT: br label [[BB2:%.*]]
897 ; NOT_CGSCC_NPM: bb2:
898 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() #[[ATTR11]]
899 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() #[[ATTR11]]
900 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() #[[ATTR11]]
901 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() #[[ATTR11]]
902 ; NOT_CGSCC_NPM-NEXT: br label [[BB3:%.*]]
903 ; NOT_CGSCC_NPM: bb3:
904 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() #[[ATTR11]]
905 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() #[[ATTR11]]
906 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() #[[ATTR11]]
907 ; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() #[[ATTR11]]
908 ; NOT_CGSCC_NPM-NEXT: br label [[BB4:%.*]]
909 ; NOT_CGSCC_NPM: bb4:
910 ; NOT_CGSCC_NPM-NEXT: call void @non_exact2()
911 ; NOT_CGSCC_NPM-NEXT: ret void
913 ; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() {
914 ; IS__CGSCC____-NEXT: bb0:
915 ; IS__CGSCC____-NEXT: call void @non_dead_b0() #[[ATTR17]]
916 ; IS__CGSCC____-NEXT: call void @non_dead_b1() #[[ATTR17]]
917 ; IS__CGSCC____-NEXT: call void @non_dead_b2() #[[ATTR17]]
918 ; IS__CGSCC____-NEXT: call void @non_dead_b3() #[[ATTR17]]
919 ; IS__CGSCC____-NEXT: br label [[BB1:%.*]]
920 ; IS__CGSCC____: bb1:
921 ; IS__CGSCC____-NEXT: call void @non_dead_b4() #[[ATTR17]]
922 ; IS__CGSCC____-NEXT: call void @non_dead_b5() #[[ATTR17]]
923 ; IS__CGSCC____-NEXT: call void @non_dead_b6() #[[ATTR17]]
924 ; IS__CGSCC____-NEXT: call void @non_dead_b7() #[[ATTR17]]
925 ; IS__CGSCC____-NEXT: br label [[BB2:%.*]]
926 ; IS__CGSCC____: bb2:
927 ; IS__CGSCC____-NEXT: call void @non_dead_b8() #[[ATTR17]]
928 ; IS__CGSCC____-NEXT: call void @non_dead_b9() #[[ATTR17]]
929 ; IS__CGSCC____-NEXT: call void @non_dead_b10() #[[ATTR17]]
930 ; IS__CGSCC____-NEXT: call void @non_dead_b11() #[[ATTR17]]
931 ; IS__CGSCC____-NEXT: br label [[BB3:%.*]]
932 ; IS__CGSCC____: bb3:
933 ; IS__CGSCC____-NEXT: call void @non_dead_b12() #[[ATTR17]]
934 ; IS__CGSCC____-NEXT: call void @non_dead_b13() #[[ATTR17]]
935 ; IS__CGSCC____-NEXT: call void @non_dead_b14() #[[ATTR17]]
936 ; IS__CGSCC____-NEXT: call void @non_dead_b15() #[[ATTR17]]
937 ; IS__CGSCC____-NEXT: br label [[BB4:%.*]]
938 ; IS__CGSCC____: bb4:
939 ; IS__CGSCC____-NEXT: call void @non_exact2()
940 ; IS__CGSCC____-NEXT: ret void
943 call void @non_dead_b0()
944 call void @non_dead_b1()
945 call void @non_dead_b2()
946 call void @non_dead_b3()
949 call void @non_dead_b4()
950 call void @non_dead_b5()
951 call void @non_dead_b6()
952 call void @non_dead_b7()
955 call void @non_dead_b8()
956 call void @non_dead_b9()
957 call void @non_dead_b10()
958 call void @non_dead_b11()
961 call void @non_dead_b12()
962 call void @non_dead_b13()
963 call void @non_dead_b14()
964 call void @non_dead_b15()
967 call void @non_exact2()
970 define linkonce_odr void @non_exact2() {
971 ; CHECK-LABEL: define {{[^@]+}}@non_exact2() {
972 ; CHECK-NEXT: call void @non_dead_c0() #[[ATTR2]]
973 ; CHECK-NEXT: call void @non_dead_c1() #[[ATTR2]]
974 ; CHECK-NEXT: call void @non_dead_c2() #[[ATTR2]]
975 ; CHECK-NEXT: call void @non_dead_c3() #[[ATTR2]]
976 ; CHECK-NEXT: call void @non_dead_c4() #[[ATTR2]]
977 ; CHECK-NEXT: call void @non_dead_c5() #[[ATTR2]]
978 ; CHECK-NEXT: call void @non_dead_c6() #[[ATTR2]]
979 ; CHECK-NEXT: call void @non_dead_c7() #[[ATTR2]]
980 ; CHECK-NEXT: call void @non_dead_c8() #[[ATTR2]]
981 ; CHECK-NEXT: call void @non_dead_c9() #[[ATTR2]]
982 ; CHECK-NEXT: call void @non_dead_c10() #[[ATTR2]]
983 ; CHECK-NEXT: call void @non_dead_c11() #[[ATTR2]]
984 ; CHECK-NEXT: call void @non_dead_c12() #[[ATTR2]]
985 ; CHECK-NEXT: call void @non_dead_c13() #[[ATTR2]]
986 ; CHECK-NEXT: call void @non_dead_c14() #[[ATTR2]]
987 ; CHECK-NEXT: call void @non_dead_c15() #[[ATTR2]]
988 ; CHECK-NEXT: call void @non_exact3()
989 ; CHECK-NEXT: ret void
991 call void @non_dead_c0()
992 call void @non_dead_c1()
993 call void @non_dead_c2()
994 call void @non_dead_c3()
995 call void @non_dead_c4()
996 call void @non_dead_c5()
997 call void @non_dead_c6()
998 call void @non_dead_c7()
999 call void @non_dead_c8()
1000 call void @non_dead_c9()
1001 call void @non_dead_c10()
1002 call void @non_dead_c11()
1003 call void @non_dead_c12()
1004 call void @non_dead_c13()
1005 call void @non_dead_c14()
1006 call void @non_dead_c15()
1007 call void @non_exact3()
1010 define linkonce_odr void @non_exact3() {
1011 ; CHECK-LABEL: define {{[^@]+}}@non_exact3() {
1012 ; CHECK-NEXT: call void @non_dead_d0() #[[ATTR2]]
1013 ; CHECK-NEXT: call void @non_dead_d1() #[[ATTR2]]
1014 ; CHECK-NEXT: call void @non_dead_d2() #[[ATTR2]]
1015 ; CHECK-NEXT: call void @non_dead_d3() #[[ATTR2]]
1016 ; CHECK-NEXT: call void @non_dead_d4() #[[ATTR2]]
1017 ; CHECK-NEXT: call void @non_dead_d5() #[[ATTR2]]
1018 ; CHECK-NEXT: call void @non_dead_d6() #[[ATTR2]]
1019 ; CHECK-NEXT: call void @non_dead_d7() #[[ATTR2]]
1020 ; CHECK-NEXT: call void @non_dead_d8() #[[ATTR2]]
1021 ; CHECK-NEXT: call void @non_dead_d9() #[[ATTR2]]
1022 ; CHECK-NEXT: call void @non_dead_d10() #[[ATTR2]]
1023 ; CHECK-NEXT: call void @non_dead_d11() #[[ATTR2]]
1024 ; CHECK-NEXT: call void @non_dead_d12() #[[ATTR2]]
1025 ; CHECK-NEXT: call void @non_dead_d13() #[[ATTR2]]
1026 ; CHECK-NEXT: call void @non_dead_d14() #[[ATTR2]]
1027 ; CHECK-NEXT: call void @non_dead_d15() #[[ATTR2]]
1028 ; CHECK-NEXT: [[NR:%.*]] = call i32 @foo_noreturn() #[[ATTR4]]
1029 ; CHECK-NEXT: unreachable
1031 call void @non_dead_d0()
1032 call void @non_dead_d1()
1033 call void @non_dead_d2()
1034 call void @non_dead_d3()
1035 call void @non_dead_d4()
1036 call void @non_dead_d5()
1037 call void @non_dead_d6()
1038 call void @non_dead_d7()
1039 call void @non_dead_d8()
1040 call void @non_dead_d9()
1041 call void @non_dead_d10()
1042 call void @non_dead_d11()
1043 call void @non_dead_d12()
1044 call void @non_dead_d13()
1045 call void @non_dead_d14()
1046 call void @non_dead_d15()
1047 %nr = call i32 @foo_noreturn()
1048 call void @dead_e1()
1052 define internal void @non_dead_a0() {
1053 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1054 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a0
1055 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1056 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1057 ; NOT_CGSCC_NPM-NEXT: ret void
1059 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1060 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0
1061 ; IS__CGSCC____-SAME: () #[[ATTR13:[0-9]+]] {
1062 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1063 ; IS__CGSCC____-NEXT: ret void
1068 define internal void @non_dead_a1() {
1069 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1070 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1
1071 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1072 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1073 ; NOT_CGSCC_NPM-NEXT: ret void
1075 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1076 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1
1077 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1078 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1079 ; IS__CGSCC____-NEXT: ret void
1084 define internal void @non_dead_a2() {
1085 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1086 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2
1087 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1088 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1089 ; NOT_CGSCC_NPM-NEXT: ret void
1091 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1092 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2
1093 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1094 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1095 ; IS__CGSCC____-NEXT: ret void
1100 define internal void @non_dead_a3() {
1101 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1102 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3
1103 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1104 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1105 ; NOT_CGSCC_NPM-NEXT: ret void
1107 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1108 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3
1109 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1110 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1111 ; IS__CGSCC____-NEXT: ret void
1116 define internal void @non_dead_a4() {
1117 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1118 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4
1119 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1120 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1121 ; NOT_CGSCC_NPM-NEXT: ret void
1123 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1124 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4
1125 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1126 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1127 ; IS__CGSCC____-NEXT: ret void
1132 define internal void @non_dead_a5() {
1133 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1134 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5
1135 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1136 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1137 ; NOT_CGSCC_NPM-NEXT: ret void
1139 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1140 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5
1141 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1142 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1143 ; IS__CGSCC____-NEXT: ret void
1148 define internal void @non_dead_a6() {
1149 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1150 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6
1151 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1152 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1153 ; NOT_CGSCC_NPM-NEXT: ret void
1155 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1156 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6
1157 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1158 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1159 ; IS__CGSCC____-NEXT: ret void
1164 define internal void @non_dead_a7() {
1165 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1166 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7
1167 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1168 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1169 ; NOT_CGSCC_NPM-NEXT: ret void
1171 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1172 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7
1173 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1174 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1175 ; IS__CGSCC____-NEXT: ret void
1180 define internal void @non_dead_a8() {
1181 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1182 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8
1183 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1184 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1185 ; NOT_CGSCC_NPM-NEXT: ret void
1187 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1188 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8
1189 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1190 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1191 ; IS__CGSCC____-NEXT: ret void
1196 define internal void @non_dead_a9() {
1197 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1198 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9
1199 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1200 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1201 ; NOT_CGSCC_NPM-NEXT: ret void
1203 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1204 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9
1205 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1206 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1207 ; IS__CGSCC____-NEXT: ret void
1212 define internal void @non_dead_a10() {
1213 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1214 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10
1215 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1216 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1217 ; NOT_CGSCC_NPM-NEXT: ret void
1219 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1220 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10
1221 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1222 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1223 ; IS__CGSCC____-NEXT: ret void
1228 define internal void @non_dead_a11() {
1229 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1230 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11
1231 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1232 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1233 ; NOT_CGSCC_NPM-NEXT: ret void
1235 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1236 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11
1237 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1238 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1239 ; IS__CGSCC____-NEXT: ret void
1244 define internal void @non_dead_a12() {
1245 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1246 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12
1247 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1248 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1249 ; NOT_CGSCC_NPM-NEXT: ret void
1251 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1252 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12
1253 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1254 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1255 ; IS__CGSCC____-NEXT: ret void
1260 define internal void @non_dead_a13() {
1261 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1262 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13
1263 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1264 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1265 ; NOT_CGSCC_NPM-NEXT: ret void
1267 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1268 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13
1269 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1270 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1271 ; IS__CGSCC____-NEXT: ret void
1276 define internal void @non_dead_a14() {
1277 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1278 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14
1279 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1280 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1281 ; NOT_CGSCC_NPM-NEXT: ret void
1283 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1284 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14
1285 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1286 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1287 ; IS__CGSCC____-NEXT: ret void
1292 define internal void @non_dead_a15() {
1293 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1294 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15
1295 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1296 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1297 ; NOT_CGSCC_NPM-NEXT: ret void
1299 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1300 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15
1301 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1302 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1303 ; IS__CGSCC____-NEXT: ret void
1308 define internal void @non_dead_b0() {
1309 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1310 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0
1311 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1312 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1313 ; NOT_CGSCC_NPM-NEXT: ret void
1315 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1316 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0
1317 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1318 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1319 ; IS__CGSCC____-NEXT: ret void
1324 define internal void @non_dead_b1() {
1325 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1326 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1
1327 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1328 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1329 ; NOT_CGSCC_NPM-NEXT: ret void
1331 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1332 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1
1333 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1334 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1335 ; IS__CGSCC____-NEXT: ret void
1340 define internal void @non_dead_b2() {
1341 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1342 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2
1343 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1344 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1345 ; NOT_CGSCC_NPM-NEXT: ret void
1347 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1348 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2
1349 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1350 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1351 ; IS__CGSCC____-NEXT: ret void
1356 define internal void @non_dead_b3() {
1357 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1358 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3
1359 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1360 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1361 ; NOT_CGSCC_NPM-NEXT: ret void
1363 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1364 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3
1365 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1366 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1367 ; IS__CGSCC____-NEXT: ret void
1372 define internal void @non_dead_b4() {
1373 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1374 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4
1375 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1376 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1377 ; NOT_CGSCC_NPM-NEXT: ret void
1379 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1380 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4
1381 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1382 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1383 ; IS__CGSCC____-NEXT: ret void
1388 define internal void @non_dead_b5() {
1389 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1390 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5
1391 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1392 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1393 ; NOT_CGSCC_NPM-NEXT: ret void
1395 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1396 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5
1397 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1398 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1399 ; IS__CGSCC____-NEXT: ret void
1404 define internal void @non_dead_b6() {
1405 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1406 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6
1407 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1408 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1409 ; NOT_CGSCC_NPM-NEXT: ret void
1411 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1412 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6
1413 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1414 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1415 ; IS__CGSCC____-NEXT: ret void
1420 define internal void @non_dead_b7() {
1421 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1422 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7
1423 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1424 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1425 ; NOT_CGSCC_NPM-NEXT: ret void
1427 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1428 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7
1429 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1430 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1431 ; IS__CGSCC____-NEXT: ret void
1436 define internal void @non_dead_b8() {
1437 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1438 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8
1439 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1440 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1441 ; NOT_CGSCC_NPM-NEXT: ret void
1443 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1444 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8
1445 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1446 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1447 ; IS__CGSCC____-NEXT: ret void
1452 define internal void @non_dead_b9() {
1453 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1454 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9
1455 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1456 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1457 ; NOT_CGSCC_NPM-NEXT: ret void
1459 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1460 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9
1461 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1462 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1463 ; IS__CGSCC____-NEXT: ret void
1468 define internal void @non_dead_b10() {
1469 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1470 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10
1471 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1472 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1473 ; NOT_CGSCC_NPM-NEXT: ret void
1475 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1476 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10
1477 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1478 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1479 ; IS__CGSCC____-NEXT: ret void
1484 define internal void @non_dead_b11() {
1485 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1486 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11
1487 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1488 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1489 ; NOT_CGSCC_NPM-NEXT: ret void
1491 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1492 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11
1493 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1494 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1495 ; IS__CGSCC____-NEXT: ret void
1500 define internal void @non_dead_b12() {
1501 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1502 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12
1503 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1504 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1505 ; NOT_CGSCC_NPM-NEXT: ret void
1507 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1508 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12
1509 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1510 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1511 ; IS__CGSCC____-NEXT: ret void
1516 define internal void @non_dead_b13() {
1517 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1518 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13
1519 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1520 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1521 ; NOT_CGSCC_NPM-NEXT: ret void
1523 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1524 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13
1525 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1526 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1527 ; IS__CGSCC____-NEXT: ret void
1532 define internal void @non_dead_b14() {
1533 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1534 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14
1535 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1536 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1537 ; NOT_CGSCC_NPM-NEXT: ret void
1539 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1540 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14
1541 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1542 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1543 ; IS__CGSCC____-NEXT: ret void
1548 define internal void @non_dead_b15() {
1549 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1550 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15
1551 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1552 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1553 ; NOT_CGSCC_NPM-NEXT: ret void
1555 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1556 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15
1557 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1558 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1559 ; IS__CGSCC____-NEXT: ret void
1564 define internal void @non_dead_c0() {
1565 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1566 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0
1567 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1568 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1569 ; NOT_CGSCC_NPM-NEXT: ret void
1571 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1572 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0
1573 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1574 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1575 ; IS__CGSCC____-NEXT: ret void
1580 define internal void @non_dead_c1() {
1581 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1582 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1
1583 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1584 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1585 ; NOT_CGSCC_NPM-NEXT: ret void
1587 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1588 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1
1589 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1590 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1591 ; IS__CGSCC____-NEXT: ret void
1596 define internal void @non_dead_c2() {
1597 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1598 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2
1599 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1600 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1601 ; NOT_CGSCC_NPM-NEXT: ret void
1603 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1604 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2
1605 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1606 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1607 ; IS__CGSCC____-NEXT: ret void
1612 define internal void @non_dead_c3() {
1613 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1614 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3
1615 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1616 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1617 ; NOT_CGSCC_NPM-NEXT: ret void
1619 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1620 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3
1621 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1622 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1623 ; IS__CGSCC____-NEXT: ret void
1628 define internal void @non_dead_c4() {
1629 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1630 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4
1631 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1632 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1633 ; NOT_CGSCC_NPM-NEXT: ret void
1635 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1636 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4
1637 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1638 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1639 ; IS__CGSCC____-NEXT: ret void
1644 define internal void @non_dead_c5() {
1645 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1646 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5
1647 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1648 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1649 ; NOT_CGSCC_NPM-NEXT: ret void
1651 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1652 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5
1653 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1654 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1655 ; IS__CGSCC____-NEXT: ret void
1660 define internal void @non_dead_c6() {
1661 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1662 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6
1663 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1664 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1665 ; NOT_CGSCC_NPM-NEXT: ret void
1667 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1668 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6
1669 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1670 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1671 ; IS__CGSCC____-NEXT: ret void
1676 define internal void @non_dead_c7() {
1677 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1678 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7
1679 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1680 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1681 ; NOT_CGSCC_NPM-NEXT: ret void
1683 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1684 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7
1685 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1686 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1687 ; IS__CGSCC____-NEXT: ret void
1692 define internal void @non_dead_c8() {
1693 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1694 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8
1695 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1696 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1697 ; NOT_CGSCC_NPM-NEXT: ret void
1699 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1700 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8
1701 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1702 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1703 ; IS__CGSCC____-NEXT: ret void
1708 define internal void @non_dead_c9() {
1709 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1710 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9
1711 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1712 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1713 ; NOT_CGSCC_NPM-NEXT: ret void
1715 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1716 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9
1717 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1718 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1719 ; IS__CGSCC____-NEXT: ret void
1724 define internal void @non_dead_c10() {
1725 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1726 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10
1727 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1728 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1729 ; NOT_CGSCC_NPM-NEXT: ret void
1731 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1732 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10
1733 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1734 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1735 ; IS__CGSCC____-NEXT: ret void
1740 define internal void @non_dead_c11() {
1741 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1742 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11
1743 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1744 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1745 ; NOT_CGSCC_NPM-NEXT: ret void
1747 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1748 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11
1749 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1750 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1751 ; IS__CGSCC____-NEXT: ret void
1756 define internal void @non_dead_c12() {
1757 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1758 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12
1759 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1760 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1761 ; NOT_CGSCC_NPM-NEXT: ret void
1763 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1764 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12
1765 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1766 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1767 ; IS__CGSCC____-NEXT: ret void
1772 define internal void @non_dead_c13() {
1773 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1774 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13
1775 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1776 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1777 ; NOT_CGSCC_NPM-NEXT: ret void
1779 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1780 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13
1781 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1782 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1783 ; IS__CGSCC____-NEXT: ret void
1788 define internal void @non_dead_c14() {
1789 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1790 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14
1791 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1792 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1793 ; NOT_CGSCC_NPM-NEXT: ret void
1795 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1796 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14
1797 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1798 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1799 ; IS__CGSCC____-NEXT: ret void
1804 define internal void @non_dead_c15() {
1805 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1806 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15
1807 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1808 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1809 ; NOT_CGSCC_NPM-NEXT: ret void
1811 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1812 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15
1813 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1814 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1815 ; IS__CGSCC____-NEXT: ret void
1820 define internal void @non_dead_d0() {
1821 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1822 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0
1823 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1824 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1825 ; NOT_CGSCC_NPM-NEXT: ret void
1827 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1828 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0
1829 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1830 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1831 ; IS__CGSCC____-NEXT: ret void
1836 define internal void @non_dead_d1() {
1837 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1838 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1
1839 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1840 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1841 ; NOT_CGSCC_NPM-NEXT: ret void
1843 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1844 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1
1845 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1846 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1847 ; IS__CGSCC____-NEXT: ret void
1852 define internal void @non_dead_d2() {
1853 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1854 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2
1855 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1856 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1857 ; NOT_CGSCC_NPM-NEXT: ret void
1859 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1860 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2
1861 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1862 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1863 ; IS__CGSCC____-NEXT: ret void
1868 define internal void @non_dead_d3() {
1869 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1870 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3
1871 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1872 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1873 ; NOT_CGSCC_NPM-NEXT: ret void
1875 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1876 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3
1877 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1878 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1879 ; IS__CGSCC____-NEXT: ret void
1884 define internal void @non_dead_d4() {
1885 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1886 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4
1887 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1888 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1889 ; NOT_CGSCC_NPM-NEXT: ret void
1891 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1892 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4
1893 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1894 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1895 ; IS__CGSCC____-NEXT: ret void
1900 define internal void @non_dead_d5() {
1901 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1902 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5
1903 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1904 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1905 ; NOT_CGSCC_NPM-NEXT: ret void
1907 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1908 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5
1909 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1910 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1911 ; IS__CGSCC____-NEXT: ret void
1916 define internal void @non_dead_d6() {
1917 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1918 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6
1919 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1920 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1921 ; NOT_CGSCC_NPM-NEXT: ret void
1923 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1924 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6
1925 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1926 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1927 ; IS__CGSCC____-NEXT: ret void
1932 define internal void @non_dead_d7() {
1933 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1934 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7
1935 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1936 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1937 ; NOT_CGSCC_NPM-NEXT: ret void
1939 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1940 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7
1941 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1942 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1943 ; IS__CGSCC____-NEXT: ret void
1948 define internal void @non_dead_d8() {
1949 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1950 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8
1951 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1952 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1953 ; NOT_CGSCC_NPM-NEXT: ret void
1955 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1956 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8
1957 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1958 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1959 ; IS__CGSCC____-NEXT: ret void
1964 define internal void @non_dead_d9() {
1965 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1966 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9
1967 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1968 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1969 ; NOT_CGSCC_NPM-NEXT: ret void
1971 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1972 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9
1973 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1974 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1975 ; IS__CGSCC____-NEXT: ret void
1980 define internal void @non_dead_d10() {
1981 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1982 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10
1983 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
1984 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
1985 ; NOT_CGSCC_NPM-NEXT: ret void
1987 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
1988 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10
1989 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
1990 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
1991 ; IS__CGSCC____-NEXT: ret void
1996 define internal void @non_dead_d11() {
1997 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
1998 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11
1999 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2000 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2001 ; NOT_CGSCC_NPM-NEXT: ret void
2003 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2004 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11
2005 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2006 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2007 ; IS__CGSCC____-NEXT: ret void
2012 define internal void @non_dead_d12() {
2013 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2014 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12
2015 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2016 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2017 ; NOT_CGSCC_NPM-NEXT: ret void
2019 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2020 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12
2021 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2022 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2023 ; IS__CGSCC____-NEXT: ret void
2028 define internal void @non_dead_d13() {
2029 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2030 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13
2031 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2032 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2033 ; NOT_CGSCC_NPM-NEXT: ret void
2035 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2036 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13
2037 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2038 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2039 ; IS__CGSCC____-NEXT: ret void
2044 define internal void @non_dead_d14() {
2045 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2046 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14
2047 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2048 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2049 ; NOT_CGSCC_NPM-NEXT: ret void
2051 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2052 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14
2053 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2054 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2055 ; IS__CGSCC____-NEXT: ret void
2060 define internal void @non_dead_d15() {
2061 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2062 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15
2063 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2064 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2065 ; NOT_CGSCC_NPM-NEXT: ret void
2067 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2068 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15
2069 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2070 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2071 ; IS__CGSCC____-NEXT: ret void
2076 define internal void @dead_e0() { call void @dead_e1() ret void }
2077 ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_e0() {
2078 ; IS__CGSCC____-NEXT: call void @dead_e1()
2079 ; IS__CGSCC____-NEXT: ret void
2081 define internal void @dead_e1() { call void @dead_e2() ret void }
2082 define internal void @dead_e2() { ret void }
2084 ; Verify we actually deduce information for these functions.
2086 declare void @blowup() noreturn
2087 define void @live_with_dead_entry() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
2089 invoke void @blowup() to label %live_with_dead_entry unwind label %lpad
2091 %0 = landingpad { i8*, i32 } catch i8* null
2092 br label %live_with_dead_entry
2093 live_with_dead_entry:
2097 define void @live_with_dead_entry_lp() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
2098 ; CHECK: Function Attrs: nounwind
2099 ; CHECK-LABEL: define {{[^@]+}}@live_with_dead_entry_lp
2100 ; CHECK-SAME: () #[[ATTR2]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
2101 ; CHECK-NEXT: entry:
2102 ; CHECK-NEXT: invoke void @blowup() #[[ATTR4]]
2103 ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD:%.*]] unwind label [[LP1:%.*]]
2105 ; CHECK-NEXT: [[LP:%.*]] = landingpad { i8*, i32 }
2106 ; CHECK-NEXT: catch i8* null
2107 ; CHECK-NEXT: invoke void @blowup() #[[ATTR4]]
2108 ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD1:%.*]] unwind label [[LP2:%.*]]
2110 ; CHECK-NEXT: [[TMP0:%.*]] = landingpad { i8*, i32 }
2111 ; CHECK-NEXT: catch i8* null
2112 ; CHECK-NEXT: br label [[LIVE_WITH_DEAD_ENTRY:%.*]]
2113 ; CHECK: live_with_dead_entry.dead:
2114 ; CHECK-NEXT: unreachable
2115 ; CHECK: live_with_dead_entry.dead1:
2116 ; CHECK-NEXT: unreachable
2117 ; CHECK: live_with_dead_entry:
2118 ; CHECK-NEXT: ret void
2121 invoke void @blowup() to label %live_with_dead_entry unwind label %lp1
2123 %lp = landingpad { i8*, i32 } catch i8* null
2124 invoke void @blowup() to label %live_with_dead_entry unwind label %lp2
2126 %0 = landingpad { i8*, i32 } catch i8* null
2127 br label %live_with_dead_entry
2128 live_with_dead_entry:
2132 define internal void @useless_arg_sink(i32* %a) {
2133 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2134 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_sink
2135 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2136 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2137 ; NOT_CGSCC_NPM-NEXT: ret void
2139 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2140 ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink
2141 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2142 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2143 ; IS__CGSCC____-NEXT: ret void
2149 define internal void @useless_arg_almost_sink(i32* %a) {
2150 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2151 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_almost_sink
2152 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2153 ; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() #[[ATTR11]]
2154 ; NOT_CGSCC_NPM-NEXT: ret void
2156 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2157 ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_almost_sink
2158 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2159 ; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR17]]
2160 ; IS__CGSCC____-NEXT: ret void
2162 call void @useless_arg_sink(i32* %a)
2166 ; Check we do not annotate the function interface of this weak function.
2167 define weak_odr void @useless_arg_ext(i32* %a) {
2168 ; CHECK-LABEL: define {{[^@]+}}@useless_arg_ext
2169 ; CHECK-SAME: (i32* [[A:%.*]]) {
2170 ; CHECK-NEXT: call void @useless_arg_almost_sink() #[[ATTR2]]
2171 ; CHECK-NEXT: ret void
2173 call void @useless_arg_almost_sink(i32* %a)
2177 define internal void @useless_arg_ext_int(i32* %a) {
2178 ; CHECK-LABEL: define {{[^@]+}}@useless_arg_ext_int
2179 ; CHECK-SAME: (i32* [[A:%.*]]) {
2180 ; CHECK-NEXT: call void @useless_arg_ext(i32* [[A]])
2181 ; CHECK-NEXT: ret void
2183 call void @useless_arg_ext(i32* %a)
2187 define void @useless_arg_ext_int_ext(i32* %a) {
2188 ; CHECK-LABEL: define {{[^@]+}}@useless_arg_ext_int_ext
2189 ; CHECK-SAME: (i32* [[A:%.*]]) {
2190 ; CHECK-NEXT: call void @useless_arg_ext_int(i32* [[A]])
2191 ; CHECK-NEXT: ret void
2193 call void @useless_arg_ext_int(i32* %a)
2197 ; FIXME: We should fold terminators.
2199 define internal i32 @switch_default(i64 %i) nounwind {
2200 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2201 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default
2202 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2203 ; NOT_CGSCC_NPM-NEXT: entry:
2204 ; NOT_CGSCC_NPM-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
2205 ; NOT_CGSCC_NPM-NEXT: i64 3, label [[RETURN:%.*]]
2206 ; NOT_CGSCC_NPM-NEXT: i64 10, label [[RETURN]]
2207 ; NOT_CGSCC_NPM-NEXT: ]
2208 ; NOT_CGSCC_NPM: sw.default:
2209 ; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]]
2210 ; NOT_CGSCC_NPM-NEXT: ret i32 undef
2211 ; NOT_CGSCC_NPM: return:
2212 ; NOT_CGSCC_NPM-NEXT: unreachable
2214 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2215 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default
2216 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2217 ; IS__CGSCC____-NEXT: entry:
2218 ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
2219 ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]]
2220 ; IS__CGSCC____-NEXT: i64 10, label [[RETURN]]
2221 ; IS__CGSCC____-NEXT: ]
2222 ; IS__CGSCC____: sw.default:
2223 ; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]]
2224 ; IS__CGSCC____-NEXT: ret i32 undef
2225 ; IS__CGSCC____: return:
2226 ; IS__CGSCC____-NEXT: unreachable
2229 switch i64 %i, label %sw.default [
2230 i64 3, label %return
2231 i64 10, label %return
2242 define i32 @switch_default_caller() {
2243 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
2244 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_caller
2245 ; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
2246 ; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR11]]
2247 ; NOT_CGSCC_NPM-NEXT: ret i32 123
2249 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
2250 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_caller
2251 ; IS__CGSCC____-SAME: () #[[ATTR13]] {
2252 ; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR17]]
2253 ; IS__CGSCC____-NEXT: ret i32 123
2255 %call2 = tail call i32 @switch_default(i64 0)
2259 define internal i32 @switch_default_dead(i64 %i) nounwind {
2260 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2261 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead
2262 ; IS__CGSCC____-SAME: () #[[ATTR6]] {
2263 ; IS__CGSCC____-NEXT: entry:
2264 ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
2265 ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]]
2266 ; IS__CGSCC____-NEXT: i64 10, label [[RETURN]]
2267 ; IS__CGSCC____-NEXT: ]
2268 ; IS__CGSCC____: sw.default:
2269 ; IS__CGSCC____-NEXT: ret i32 undef
2270 ; IS__CGSCC____: return:
2271 ; IS__CGSCC____-NEXT: unreachable
2274 switch i64 %i, label %sw.default [
2275 i64 3, label %return
2276 i64 10, label %return
2286 define i32 @switch_default_dead_caller() {
2287 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
2288 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller
2289 ; NOT_CGSCC_NPM-SAME: () #[[ATTR12:[0-9]+]] {
2290 ; NOT_CGSCC_NPM-NEXT: ret i32 123
2292 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2293 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller
2294 ; IS__CGSCC____-SAME: () #[[ATTR6]] {
2295 ; IS__CGSCC____-NEXT: ret i32 123
2297 %call2 = tail call i32 @switch_default_dead(i64 0)
2301 define void @call_via_pointer_with_dead_args(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
2302 ; CHECK-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args
2303 ; CHECK-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull [[FP:%.*]]) {
2304 ; CHECK-NEXT: call void [[FP]](i32* [[A]], i32* [[B]], i32* [[A]], i64 -1, i32** null)
2305 ; CHECK-NEXT: ret void
2307 call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
2310 ; FIXME: We have to prevent the propagation of %fp in the new pm CGSCC pass until the CallGraphUpdater can handle the new call edge.
2311 define internal void @call_via_pointer_with_dead_args_internal_a(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
2312 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
2313 ; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
2314 ; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
2315 ; NOT_CGSCC_NPM-NEXT: ret void
2317 ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
2318 ; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull [[FP:%.*]]) {
2319 ; IS__CGSCC____-NEXT: call void [[FP]](i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
2320 ; IS__CGSCC____-NEXT: ret void
2322 call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
2325 define internal void @call_via_pointer_with_dead_args_internal_b(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
2326 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
2327 ; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
2328 ; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer_internal_2(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
2329 ; NOT_CGSCC_NPM-NEXT: ret void
2331 ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
2332 ; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull [[FP:%.*]]) {
2333 ; IS__CGSCC____-NEXT: call void [[FP]](i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
2334 ; IS__CGSCC____-NEXT: ret void
2336 call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
2339 define void @call_via_pointer_with_dead_args_caller(i32* %a, i32* %b) {
2340 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
2341 ; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
2342 ; NOT_CGSCC_NPM-NEXT: [[PTR1:%.*]] = alloca i32, align 128
2343 ; NOT_CGSCC_NPM-NEXT: [[PTR2:%.*]] = alloca i32, align 128
2344 ; NOT_CGSCC_NPM-NEXT: [[PTR3:%.*]] = alloca i32, align 128
2345 ; NOT_CGSCC_NPM-NEXT: [[PTR4:%.*]] = alloca i32, align 128
2346 ; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer)
2347 ; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer_internal_1)
2348 ; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
2349 ; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
2350 ; NOT_CGSCC_NPM-NEXT: ret void
2352 ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
2353 ; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
2354 ; IS__CGSCC____-NEXT: [[PTR1:%.*]] = alloca i32, align 128
2355 ; IS__CGSCC____-NEXT: [[PTR2:%.*]] = alloca i32, align 128
2356 ; IS__CGSCC____-NEXT: [[PTR3:%.*]] = alloca i32, align 128
2357 ; IS__CGSCC____-NEXT: [[PTR4:%.*]] = alloca i32, align 128
2358 ; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
2359 ; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_1)
2360 ; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
2361 ; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_2)
2362 ; IS__CGSCC____-NEXT: ret void
2364 %ptr1 = alloca i32, align 128
2365 %ptr2 = alloca i32, align 128
2366 %ptr3 = alloca i32, align 128
2367 %ptr4 = alloca i32, align 128
2368 call void @call_via_pointer_with_dead_args(i32* %a, i32* %ptr1, void (i32*, i32*, i32*, i64, i32**)* @called_via_pointer)
2369 call void @call_via_pointer_with_dead_args(i32* %a, i32* %ptr2, void (i32*, i32*, i32*, i64, i32**)* @called_via_pointer_internal_1)
2370 call void @call_via_pointer_with_dead_args_internal_a(i32* %b, i32* %ptr3, void (i32*, i32*, i32*, i64, i32**)* @called_via_pointer)
2371 call void @call_via_pointer_with_dead_args_internal_b(i32* %b, i32* %ptr4, void (i32*, i32*, i32*, i64, i32**)* @called_via_pointer_internal_2)
2374 define void @called_via_pointer(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
2375 ; CHECK-LABEL: define {{[^@]+}}@called_via_pointer
2376 ; CHECK-SAME: (i32* [[A:%.*]], i32* nocapture nofree readnone [[B:%.*]], i32* nocapture nofree readnone [[C:%.*]], i64 [[D:%.*]], i32** nocapture nofree readnone [[E:%.*]]) {
2377 ; CHECK-NEXT: entry:
2378 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2379 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2380 ; CHECK-NEXT: ret void
2383 tail call void @use_i32p(i32* %a)
2384 tail call void @use_i32p(i32* %a)
2387 define internal void @called_via_pointer_internal_1(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
2388 ; CHECK-LABEL: define {{[^@]+}}@called_via_pointer_internal_1
2389 ; CHECK-SAME: (i32* [[A:%.*]], i32* nocapture nofree readnone [[B:%.*]], i32* nocapture nofree readnone [[C:%.*]], i64 [[D:%.*]], i32** nocapture nofree readnone [[E:%.*]]) {
2390 ; CHECK-NEXT: entry:
2391 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2392 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2393 ; CHECK-NEXT: ret void
2396 tail call void @use_i32p(i32* %a)
2397 tail call void @use_i32p(i32* %a)
2400 ; FIXME: Figure out why the MODULE has the unused arguments still
2401 define internal void @called_via_pointer_internal_2(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
2402 ; CHECK-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
2403 ; CHECK-SAME: (i32* [[A:%.*]], i32* nocapture nofree readnone [[B:%.*]], i32* nocapture nofree readnone [[C:%.*]], i64 [[D:%.*]], i32** nocapture nofree readnone [[E:%.*]]) {
2404 ; CHECK-NEXT: entry:
2405 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2406 ; CHECK-NEXT: tail call void @use_i32p(i32* [[A]])
2407 ; CHECK-NEXT: ret void
2410 tail call void @use_i32p(i32* %a)
2411 tail call void @use_i32p(i32* %a)
2414 declare void @use_i32p(i32*)
2416 ; Allow blockaddress users
2417 define internal void @dead_with_blockaddress_users(i32* nocapture %pc) nounwind readonly {
2418 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@dead_with_blockaddress_users
2419 ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 536870912 dereferenceable(4294967295) [[PC:%.*]])
2420 ; IS__CGSCC_OPM-NEXT: entry:
2421 ; IS__CGSCC_OPM-NEXT: br label [[INDIRECTGOTO:%.*]]
2422 ; IS__CGSCC_OPM: lab0:
2423 ; IS__CGSCC_OPM-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
2424 ; IS__CGSCC_OPM-NEXT: br label [[INDIRECTGOTO]]
2425 ; IS__CGSCC_OPM: end:
2426 ; IS__CGSCC_OPM-NEXT: ret void
2427 ; IS__CGSCC_OPM: indirectgoto:
2428 ; IS__CGSCC_OPM-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
2429 ; IS__CGSCC_OPM-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* [[PC]], i32 [[INDVAR]]
2430 ; IS__CGSCC_OPM-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]]
2431 ; IS__CGSCC_OPM-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @dead_with_blockaddress_users.l, i32 0, i32 [[TMP1_PN]]
2432 ; IS__CGSCC_OPM-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]]
2433 ; IS__CGSCC_OPM-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end]
2435 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone
2436 ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_with_blockaddress_users
2437 ; IS__CGSCC____-SAME: () #[[ATTR14:[0-9]+]] {
2438 ; IS__CGSCC____-NEXT: entry:
2439 ; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO:%.*]]
2440 ; IS__CGSCC____: lab0:
2441 ; IS__CGSCC____-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
2442 ; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO]]
2443 ; IS__CGSCC____: end:
2444 ; IS__CGSCC____-NEXT: ret void
2445 ; IS__CGSCC____: indirectgoto:
2446 ; IS__CGSCC____-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
2447 ; IS__CGSCC____-NEXT: indirectbr i8* undef, [label [[LAB0]], label %end]
2450 br label %indirectgoto
2452 lab0: ; preds = %indirectgoto
2453 %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
2454 br label %indirectgoto
2456 end: ; preds = %indirectgoto
2459 indirectgoto: ; preds = %lab0, %entry
2460 %indvar = phi i32 [ %indvar.next, %lab0 ], [ 0, %entry ] ; <i32> [#uses=2]
2461 %pc.addr.0 = getelementptr i32, i32* %pc, i32 %indvar ; <i32*> [#uses=1]
2462 %tmp1.pn = load i32, i32* %pc.addr.0 ; <i32> [#uses=1]
2463 %indirect.goto.dest.in = getelementptr inbounds [2 x i8*], [2 x i8*]* @dead_with_blockaddress_users.l, i32 0, i32 %tmp1.pn ; <i8**> [#uses=1]
2464 %indirect.goto.dest = load i8*, i8** %indirect.goto.dest.in ; <i8*> [#uses=1]
2465 indirectbr i8* %indirect.goto.dest, [label %lab0, label %end]
2469 ; The code below exposed a bug that caused %call to be replaced with `undef`.
2471 %struct.a = type { %struct.a* }
2473 @e = global %struct.a* null
2475 define i32 @main() {
2476 ; CHECK-LABEL: define {{[^@]+}}@main() {
2477 ; CHECK-NEXT: entry:
2478 ; CHECK-NEXT: [[F:%.*]] = alloca i32, align 4
2479 ; CHECK-NEXT: br label [[FOR_COND_0:%.*]]
2480 ; CHECK: for.cond.0:
2481 ; CHECK-NEXT: [[G_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY_0:%.*]] ]
2482 ; CHECK-NEXT: [[CMP_0:%.*]] = icmp ult i32 [[G_0]], 100
2483 ; CHECK-NEXT: br i1 [[CMP_0]], label [[FOR_BODY_0]], label [[FOR_END_0:%.*]]
2484 ; CHECK: for.body.0:
2485 ; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
2486 ; CHECK-NEXT: br label [[FOR_COND_0]]
2488 ; CHECK-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 noundef 8)
2489 ; CHECK-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
2490 ; CHECK-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
2491 ; CHECK-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
2492 ; CHECK-NEXT: br label [[FOR_COND_1:%.*]]
2493 ; CHECK: for.cond.1:
2494 ; CHECK-NEXT: [[G_1:%.*]] = phi i32 [ 0, [[FOR_END_0]] ], [ [[INC6:%.*]], [[FOR_BODY_1:%.*]] ]
2495 ; CHECK-NEXT: [[CMP_1:%.*]] = icmp ult i32 [[G_1]], 100
2496 ; CHECK-NEXT: br i1 [[CMP_1]], label [[FOR_BODY_1]], label [[FOR_END_1:%.*]]
2497 ; CHECK: for.body.1:
2498 ; CHECK-NEXT: [[CALL4:%.*]] = call i32 (i32*, ...) bitcast (i32 (i32)* @h to i32 (i32*, ...)*)(i32* nonnull [[F]])
2499 ; CHECK-NEXT: [[INC6]] = add nuw nsw i32 [[G_1]], 1
2500 ; CHECK-NEXT: br label [[FOR_COND_1]]
2502 ; CHECK-NEXT: ret i32 0
2506 br label %for.cond.0
2509 %g.0 = phi i32 [ 0, %entry ], [ %inc, %for.body.0 ]
2510 %cmp.0 = icmp ult i32 %g.0, 100
2511 br i1 %cmp.0, label %for.body.0, label %for.end.0
2514 %inc = add nuw nsw i32 %g.0, 1
2515 br label %for.cond.0
2518 %call = call i8* @malloc(i64 8)
2519 store i8* %call, i8** bitcast (%struct.a** @e to i8**)
2520 %b = bitcast i8* %call to %struct.a**
2521 store %struct.a* null, %struct.a** %b
2522 br label %for.cond.1
2525 %g.1 = phi i32 [ 0, %for.end.0 ], [ %inc6, %for.body.1 ]
2526 %cmp.1 = icmp ult i32 %g.1, 100
2527 br i1 %cmp.1, label %for.body.1, label %for.end.1
2530 %call4 = call i32 (i32*, ...) bitcast (i32 (i32)* @h to i32 (i32*, ...)*)(i32* nonnull %f)
2531 %inc6 = add nuw nsw i32 %g.1, 1
2532 br label %for.cond.1
2538 declare noalias i8* @malloc(i64)
2540 define i32 @h(i32 %i) {
2541 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
2542 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h
2543 ; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR12]] {
2544 ; NOT_CGSCC_NPM-NEXT: ret i32 0
2546 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2547 ; IS__CGSCC____-LABEL: define {{[^@]+}}@h
2548 ; IS__CGSCC____-SAME: (i32 [[I:%.*]]) #[[ATTR6]] {
2549 ; IS__CGSCC____-NEXT: ret i32 0
2555 ; Verify we do not choke on the GEP in the unreachable block.
2559 define void @bad_gep() {
2560 ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
2561 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep
2562 ; NOT_CGSCC_NPM-SAME: () #[[ATTR12]] {
2563 ; NOT_CGSCC_NPM-NEXT: entry:
2564 ; NOT_CGSCC_NPM-NEXT: [[N:%.*]] = alloca i8, align 1
2565 ; NOT_CGSCC_NPM-NEXT: [[M:%.*]] = alloca i8, align 1
2566 ; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15:[0-9]+]]
2567 ; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]]
2568 ; NOT_CGSCC_NPM: while.body:
2569 ; NOT_CGSCC_NPM-NEXT: unreachable
2570 ; NOT_CGSCC_NPM: if.then:
2571 ; NOT_CGSCC_NPM-NEXT: unreachable
2572 ; NOT_CGSCC_NPM: if.end:
2573 ; NOT_CGSCC_NPM-NEXT: unreachable
2574 ; NOT_CGSCC_NPM: exit:
2575 ; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15]]
2576 ; NOT_CGSCC_NPM-NEXT: ret void
2578 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
2579 ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep
2580 ; IS__CGSCC____-SAME: () #[[ATTR15:[0-9]+]] {
2581 ; IS__CGSCC____-NEXT: entry:
2582 ; IS__CGSCC____-NEXT: [[N:%.*]] = alloca i8, align 1
2583 ; IS__CGSCC____-NEXT: [[M:%.*]] = alloca i8, align 1
2584 ; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR18:[0-9]+]]
2585 ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]]
2586 ; IS__CGSCC____: while.body:
2587 ; IS__CGSCC____-NEXT: unreachable
2588 ; IS__CGSCC____: if.then:
2589 ; IS__CGSCC____-NEXT: unreachable
2590 ; IS__CGSCC____: if.end:
2591 ; IS__CGSCC____-NEXT: unreachable
2592 ; IS__CGSCC____: exit:
2593 ; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR18]]
2594 ; IS__CGSCC____-NEXT: ret void
2599 call void @llvm.lifetime.start.p0i8(i64 1, i8* %n)
2603 %call = call i1 @bad_gep_helper1(i8* %n, i8* %ptr, i8* %m)
2604 br i1 %call, label %if.then, label %if.end
2607 %0 = load i8, i8* %ptr
2608 call void @bad_gep_helper2(i8 %0)
2612 %ptr = getelementptr inbounds i8, i8* %ptr, i64 1
2613 %cmp = icmp eq i8* %ptr, @p
2614 br i1 %cmp, label %exit, label %while.body
2617 call void @llvm.lifetime.end.p0i8(i64 1, i8* %n)
2621 declare i1 @bad_gep_helper1(i8*, i8*, i8*)
2622 declare void @bad_gep_helper2(i8)
2624 declare void @llvm.lifetime.start.p0i8(i64 %0, i8* %1)
2625 declare void @llvm.lifetime.end.p0i8(i64 %0, i8* %1)
2627 ; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
2628 ; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { readnone }
2629 ; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nounwind }
2630 ; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { noreturn nounwind }
2631 ; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { noreturn }
2632 ; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { nosync readnone }
2633 ; NOT_CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind uwtable willreturn }
2634 ; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nosync }
2635 ; NOT_CGSCC_NPM: attributes #[[ATTR8:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly }
2636 ; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree noreturn nosync nounwind readnone }
2637 ; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree noreturn nosync nounwind readnone willreturn }
2638 ; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn }
2639 ; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
2640 ; NOT_CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
2641 ; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn }
2642 ; NOT_CGSCC_NPM: attributes #[[ATTR15]] = { willreturn }
2644 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
2645 ; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { readnone }
2646 ; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind }
2647 ; IS__CGSCC____: attributes #[[ATTR3]] = { noreturn nounwind }
2648 ; IS__CGSCC____: attributes #[[ATTR4]] = { noreturn }
2649 ; IS__CGSCC____: attributes #[[ATTR5]] = { nosync readnone }
2650 ; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readnone willreturn }
2651 ; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nounwind uwtable willreturn }
2652 ; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone uwtable willreturn }
2653 ; IS__CGSCC____: attributes #[[ATTR9]] = { nosync }
2654 ; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
2655 ; IS__CGSCC____: attributes #[[ATTR11]] = { nofree norecurse noreturn nosync nounwind readnone }
2656 ; IS__CGSCC____: attributes #[[ATTR12]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
2657 ; IS__CGSCC____: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn }
2658 ; IS__CGSCC____: attributes #[[ATTR14]] = { nofree norecurse nosync nounwind readnone }
2659 ; IS__CGSCC____: attributes #[[ATTR15]] = { nofree nosync nounwind readnone willreturn }
2660 ; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
2661 ; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind willreturn }
2662 ; IS__CGSCC____: attributes #[[ATTR18]] = { willreturn }