1010; code path which isn't ever executed.
1111
1212; 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 {
1414 store i32 0 , ptr %p , !tbaa !1
1515 ret void
1616}
1717
1818; 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 {
2020 store i32 0 , ptr %p , !tbaa !2
2121 ret void
2222}
@@ -25,13 +25,13 @@ define void @test0_no(ptr %p) nounwind {
2525; TBAA says only accesses constant memory.
2626
2727; 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 {
2929 call void @callee (ptr %p ), !tbaa !1
3030 ret void
3131}
3232
3333; 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 {
3535 call void @callee (ptr %p ), !tbaa !2
3636 ret void
3737}
@@ -44,40 +44,41 @@ define void @test1_no(ptr %p) nounwind {
4444; isn't necessarily invalid.
4545
4646; 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 {
4848 call void @llvm.memcpy.p0.p0.i64 (ptr %p , ptr %q , i64 %n , i1 false ), !tbaa !1
4949 ret void
5050}
5151
5252; 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 {
5454 call void @llvm.memcpy.p0.p0.i64 (ptr %p , ptr %q , i64 %n , i1 false ), !tbaa !2
5555 ret void
5656}
5757
5858; Similar to the others, va_arg only accesses memory through its operand.
5959
6060; 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 {
6262 %t = va_arg ptr %p , i32 , !tbaa !1
6363 ret i32 %t
6464}
6565
6666; 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 {
6868 %t = va_arg ptr %p , i32 , !tbaa !2
6969 ret i32 %t
7070}
7171
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
7474
7575; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
7676; 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 }
7979; 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) }
8182
8283; Root note.
8384!0 = !{ }
0 commit comments