@@ -6,7 +6,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6
6
7
7
; Base case, empty function
8
8
define void @test1 () {
9
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
9
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
10
10
; CHECK-LABEL: @test1(
11
11
; CHECK-NEXT: ret void
12
12
;
@@ -15,7 +15,7 @@ define void @test1() {
15
15
16
16
; Show the bottom up walk
17
17
define void @test2 () {
18
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
18
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
19
19
; CHECK-LABEL: @test2(
20
20
; CHECK-NEXT: call void @test1()
21
21
; CHECK-NEXT: ret void
@@ -38,7 +38,7 @@ define void @test3() convergent {
38
38
}
39
39
40
40
define i32 @test4 (i32 %a , i32 %b ) {
41
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
41
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
42
42
; CHECK-LABEL: @test4(
43
43
; CHECK-NEXT: [[ADD:%.*]] = add i32 [[A:%.*]], [[B:%.*]]
44
44
; CHECK-NEXT: ret i32 [[A]]
@@ -49,7 +49,7 @@ define i32 @test4(i32 %a, i32 %b) {
49
49
50
50
; negative case - explicit sync
51
51
define void @test5 (i8* %p ) {
52
- ; CHECK: Function Attrs: nofree norecurse nounwind willreturn
52
+ ; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
53
53
; CHECK-LABEL: @test5(
54
54
; CHECK-NEXT: store atomic i8 0, i8* [[P:%.*]] seq_cst, align 1
55
55
; CHECK-NEXT: ret void
@@ -60,7 +60,7 @@ define void @test5(i8* %p) {
60
60
61
61
; negative case - explicit sync
62
62
define i8 @test6 (i8* %p ) {
63
- ; CHECK: Function Attrs: nofree norecurse nounwind willreturn
63
+ ; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
64
64
; CHECK-LABEL: @test6(
65
65
; CHECK-NEXT: [[V:%.*]] = load atomic i8, i8* [[P:%.*]] seq_cst, align 1
66
66
; CHECK-NEXT: ret i8 [[V]]
@@ -71,7 +71,7 @@ define i8 @test6(i8* %p) {
71
71
72
72
; negative case - explicit sync
73
73
define void @test7 (i8* %p ) {
74
- ; CHECK: Function Attrs: nofree norecurse nounwind willreturn
74
+ ; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
75
75
; CHECK-LABEL: @test7(
76
76
; CHECK-NEXT: [[TMP1:%.*]] = atomicrmw add i8* [[P:%.*]], i8 0 seq_cst, align 1
77
77
; CHECK-NEXT: ret void
@@ -82,7 +82,7 @@ define void @test7(i8* %p) {
82
82
83
83
; negative case - explicit sync
84
84
define void @test8 (i8* %p ) {
85
- ; CHECK: Function Attrs: nofree norecurse nounwind willreturn
85
+ ; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
86
86
; CHECK-LABEL: @test8(
87
87
; CHECK-NEXT: fence seq_cst
88
88
; CHECK-NEXT: ret void
@@ -93,7 +93,7 @@ define void @test8(i8* %p) {
93
93
94
94
; singlethread fences are okay
95
95
define void @test9 (i8* %p ) {
96
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn
96
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress
97
97
; CHECK-LABEL: @test9(
98
98
; CHECK-NEXT: fence syncscope("singlethread") seq_cst
99
99
; CHECK-NEXT: ret void
@@ -104,7 +104,7 @@ define void @test9(i8* %p) {
104
104
105
105
; atomic load with monotonic ordering
106
106
define i32 @load_monotonic (i32* nocapture readonly %0 ) norecurse nounwind uwtable {
107
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
107
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
108
108
; CHECK-LABEL: @load_monotonic(
109
109
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] monotonic, align 4
110
110
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -115,7 +115,7 @@ define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtabl
115
115
116
116
; atomic store with monotonic ordering.
117
117
define void @store_monotonic (i32* nocapture %0 ) norecurse nounwind uwtable {
118
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
118
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
119
119
; CHECK-LABEL: @store_monotonic(
120
120
; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] monotonic, align 4
121
121
; CHECK-NEXT: ret void
@@ -127,7 +127,7 @@ define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable {
127
127
; negative, should not deduce nosync
128
128
; atomic load with acquire ordering.
129
129
define i32 @load_acquire (i32* nocapture readonly %0 ) norecurse nounwind uwtable {
130
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
130
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
131
131
; CHECK-LABEL: @load_acquire(
132
132
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] acquire, align 4
133
133
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -137,7 +137,7 @@ define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable
137
137
}
138
138
139
139
define i32 @load_unordered (i32* nocapture readonly %0 ) norecurse nounwind uwtable {
140
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly uwtable willreturn
140
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly uwtable willreturn mustprogress
141
141
; CHECK-LABEL: @load_unordered(
142
142
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] unordered, align 4
143
143
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -148,7 +148,7 @@ define i32 @load_unordered(i32* nocapture readonly %0) norecurse nounwind uwtabl
148
148
149
149
; atomic store with unordered ordering.
150
150
define void @store_unordered (i32* nocapture %0 ) norecurse nounwind uwtable {
151
- ; CHECK: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn writeonly
151
+ ; CHECK: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn writeonly mustprogress
152
152
; CHECK-LABEL: @store_unordered(
153
153
; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] unordered, align 4
154
154
; CHECK-NEXT: ret void
@@ -161,7 +161,7 @@ define void @store_unordered(i32* nocapture %0) norecurse nounwind uwtable {
161
161
; negative, should not deduce nosync
162
162
; atomic load with release ordering
163
163
define void @load_release (i32* nocapture %0 ) norecurse nounwind uwtable {
164
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
164
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
165
165
; CHECK-LABEL: @load_release(
166
166
; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4
167
167
; CHECK-NEXT: ret void
@@ -172,7 +172,7 @@ define void @load_release(i32* nocapture %0) norecurse nounwind uwtable {
172
172
173
173
; negative volatile, relaxed atomic
174
174
define void @load_volatile_release (i32* nocapture %0 ) norecurse nounwind uwtable {
175
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
175
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
176
176
; CHECK-LABEL: @load_volatile_release(
177
177
; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4
178
178
; CHECK-NEXT: ret void
@@ -183,7 +183,7 @@ define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable
183
183
184
184
; volatile store.
185
185
define void @volatile_store (i32* %0 ) norecurse nounwind uwtable {
186
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
186
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
187
187
; CHECK-LABEL: @volatile_store(
188
188
; CHECK-NEXT: store volatile i32 14, i32* [[TMP0:%.*]], align 4
189
189
; CHECK-NEXT: ret void
@@ -195,7 +195,7 @@ define void @volatile_store(i32* %0) norecurse nounwind uwtable {
195
195
; negative, should not deduce nosync
196
196
; volatile load.
197
197
define i32 @volatile_load (i32* %0 ) norecurse nounwind uwtable {
198
- ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn
198
+ ; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
199
199
; CHECK-LABEL: @volatile_load(
200
200
; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0:%.*]], align 4
201
201
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -237,7 +237,7 @@ declare void @llvm.memset(i8* %dest, i8 %val, i32 %len, i1 %isvolatile)
237
237
238
238
; negative, checking volatile intrinsics.
239
239
define i32 @memcpy_volatile (i8* %ptr1 , i8* %ptr2 ) {
240
- ; CHECK: Function Attrs: nofree nounwind willreturn
240
+ ; CHECK: Function Attrs: nofree nounwind willreturn mustprogress
241
241
; CHECK-LABEL: @memcpy_volatile(
242
242
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[PTR1:%.*]], i8* [[PTR2:%.*]], i32 8, i1 true)
243
243
; CHECK-NEXT: ret i32 4
@@ -248,7 +248,7 @@ define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) {
248
248
249
249
; positive, non-volatile intrinsic.
250
250
define i32 @memset_non_volatile (i8* %ptr1 , i8 %val ) {
251
- ; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly
251
+ ; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress
252
252
; CHECK-LABEL: @memset_non_volatile(
253
253
; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* [[PTR1:%.*]], i8 [[VAL:%.*]], i32 8, i1 false)
254
254
; CHECK-NEXT: ret i32 4
@@ -299,7 +299,7 @@ define void @i_totally_sync() {
299
299
declare float @llvm.cos (float %val ) readnone
300
300
301
301
define float @cos_test (float %x ) {
302
- ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn
302
+ ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress
303
303
; CHECK-LABEL: @cos_test(
304
304
; CHECK-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X:%.*]])
305
305
; CHECK-NEXT: ret float [[C]]
0 commit comments