10
10
; code path which isn't ever executed.
11
11
12
12
; CHECK: define void @test0_yes(ptr captures(none) %p) #0 {
13
- define void @test0_yes (ptr %p ) nounwind {
13
+ define void @test0_yes (ptr %p ) nounwind willreturn {
14
14
store i32 0 , ptr %p , !tbaa !1
15
15
ret void
16
16
}
17
17
18
18
; CHECK: define void @test0_no(ptr writeonly captures(none) initializes((0, 4)) %p) #1 {
19
- define void @test0_no (ptr %p ) nounwind {
19
+ define void @test0_no (ptr %p ) nounwind willreturn {
20
20
store i32 0 , ptr %p , !tbaa !2
21
21
ret void
22
22
}
@@ -25,13 +25,13 @@ define void @test0_no(ptr %p) nounwind {
25
25
; TBAA says only accesses constant memory.
26
26
27
27
; CHECK: define void @test1_yes(ptr captures(none) %p) #2 {
28
- define void @test1_yes (ptr %p ) nounwind {
28
+ define void @test1_yes (ptr %p ) nounwind willreturn {
29
29
call void @callee (ptr %p ), !tbaa !1
30
30
ret void
31
31
}
32
32
33
33
; CHECK: define void @test1_no(ptr %p) #3 {
34
- define void @test1_no (ptr %p ) nounwind {
34
+ define void @test1_no (ptr %p ) nounwind willreturn {
35
35
call void @callee (ptr %p ), !tbaa !2
36
36
ret void
37
37
}
@@ -44,40 +44,41 @@ define void @test1_no(ptr %p) nounwind {
44
44
; isn't necessarily invalid.
45
45
46
46
; CHECK: define void @test2_yes(ptr captures(none) %p, ptr captures(none) %q, i64 %n) #0 {
47
- define void @test2_yes (ptr %p , ptr %q , i64 %n ) nounwind {
47
+ define void @test2_yes (ptr %p , ptr %q , i64 %n ) nounwind willreturn {
48
48
call void @llvm.memcpy.p0.p0.i64 (ptr %p , ptr %q , i64 %n , i1 false ), !tbaa !1
49
49
ret void
50
50
}
51
51
52
52
; CHECK: define void @test2_no(ptr writeonly captures(none) %p, ptr readonly captures(none) %q, i64 %n) #4 {
53
- define void @test2_no (ptr %p , ptr %q , i64 %n ) nounwind {
53
+ define void @test2_no (ptr %p , ptr %q , i64 %n ) nounwind willreturn {
54
54
call void @llvm.memcpy.p0.p0.i64 (ptr %p , ptr %q , i64 %n , i1 false ), !tbaa !2
55
55
ret void
56
56
}
57
57
58
58
; Similar to the others, va_arg only accesses memory through its operand.
59
59
60
60
; CHECK: define i32 @test3_yes(ptr captures(none) %p) #0 {
61
- define i32 @test3_yes (ptr %p ) nounwind {
61
+ define i32 @test3_yes (ptr %p ) nounwind willreturn {
62
62
%t = va_arg ptr %p , i32 , !tbaa !1
63
63
ret i32 %t
64
64
}
65
65
66
66
; CHECK: define i32 @test3_no(ptr captures(none) %p) #4 {
67
- define i32 @test3_no (ptr %p ) nounwind {
67
+ define i32 @test3_no (ptr %p ) nounwind willreturn {
68
68
%t = va_arg ptr %p , i32 , !tbaa !2
69
69
ret i32 %t
70
70
}
71
71
72
- declare void @callee (ptr %p ) nounwind
73
- declare void @llvm.memcpy.p0.p0.i64 (ptr , ptr , i64 , i1 ) nounwind
72
+ declare void @callee (ptr %p ) nounwind willreturn
73
+ declare void @llvm.memcpy.p0.p0.i64 (ptr , ptr , i64 , i1 ) nounwind willreturn
74
74
75
75
; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
76
76
; CHECK: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) }
77
- ; CHECK: attributes #2 = { nofree nosync nounwind memory(none) }
78
- ; CHECK: attributes #3 = { nounwind }
77
+ ; CHECK: attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) }
78
+ ; CHECK: attributes #3 = { mustprogress nounwind willreturn }
79
79
; CHECK: attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) }
80
- ; CHECK: attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
80
+ ; CHECK: attributes #5 = { nounwind willreturn }
81
+ ; CHECK: attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
81
82
82
83
; Root note.
83
84
!0 = !{ }
0 commit comments