Skip to content

Commit 8f21a6e

Browse files
nhaehnlememfrob
authored andcommitted
[tests] Update Transforms/FunctionAttrs/nosync.ll
Commit generated by running update_test_checks.py, to reflect the fact that we now add the `mustprogress` attribute.
1 parent ba1e3c7 commit 8f21a6e

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

llvm/test/Transforms/FunctionAttrs/nosync.ll

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
66

77
; Base case, empty function
88
define void @test1() {
9-
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
9+
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
1010
; CHECK-LABEL: @test1(
1111
; CHECK-NEXT: ret void
1212
;
@@ -15,7 +15,7 @@ define void @test1() {
1515

1616
; Show the bottom up walk
1717
define void @test2() {
18-
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
18+
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
1919
; CHECK-LABEL: @test2(
2020
; CHECK-NEXT: call void @test1()
2121
; CHECK-NEXT: ret void
@@ -38,7 +38,7 @@ define void @test3() convergent {
3838
}
3939

4040
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
4242
; CHECK-LABEL: @test4(
4343
; CHECK-NEXT: [[ADD:%.*]] = add i32 [[A:%.*]], [[B:%.*]]
4444
; CHECK-NEXT: ret i32 [[A]]
@@ -49,7 +49,7 @@ define i32 @test4(i32 %a, i32 %b) {
4949

5050
; negative case - explicit sync
5151
define void @test5(i8* %p) {
52-
; CHECK: Function Attrs: nofree norecurse nounwind willreturn
52+
; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
5353
; CHECK-LABEL: @test5(
5454
; CHECK-NEXT: store atomic i8 0, i8* [[P:%.*]] seq_cst, align 1
5555
; CHECK-NEXT: ret void
@@ -60,7 +60,7 @@ define void @test5(i8* %p) {
6060

6161
; negative case - explicit sync
6262
define i8 @test6(i8* %p) {
63-
; CHECK: Function Attrs: nofree norecurse nounwind willreturn
63+
; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
6464
; CHECK-LABEL: @test6(
6565
; CHECK-NEXT: [[V:%.*]] = load atomic i8, i8* [[P:%.*]] seq_cst, align 1
6666
; CHECK-NEXT: ret i8 [[V]]
@@ -71,7 +71,7 @@ define i8 @test6(i8* %p) {
7171

7272
; negative case - explicit sync
7373
define void @test7(i8* %p) {
74-
; CHECK: Function Attrs: nofree norecurse nounwind willreturn
74+
; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
7575
; CHECK-LABEL: @test7(
7676
; CHECK-NEXT: [[TMP1:%.*]] = atomicrmw add i8* [[P:%.*]], i8 0 seq_cst, align 1
7777
; CHECK-NEXT: ret void
@@ -82,7 +82,7 @@ define void @test7(i8* %p) {
8282

8383
; negative case - explicit sync
8484
define void @test8(i8* %p) {
85-
; CHECK: Function Attrs: nofree norecurse nounwind willreturn
85+
; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress
8686
; CHECK-LABEL: @test8(
8787
; CHECK-NEXT: fence seq_cst
8888
; CHECK-NEXT: ret void
@@ -93,7 +93,7 @@ define void @test8(i8* %p) {
9393

9494
; singlethread fences are okay
9595
define void @test9(i8* %p) {
96-
; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn
96+
; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress
9797
; CHECK-LABEL: @test9(
9898
; CHECK-NEXT: fence syncscope("singlethread") seq_cst
9999
; CHECK-NEXT: ret void
@@ -104,7 +104,7 @@ define void @test9(i8* %p) {
104104

105105
; atomic load with monotonic ordering
106106
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
108108
; CHECK-LABEL: @load_monotonic(
109109
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] monotonic, align 4
110110
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -115,7 +115,7 @@ define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtabl
115115

116116
; atomic store with monotonic ordering.
117117
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
119119
; CHECK-LABEL: @store_monotonic(
120120
; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] monotonic, align 4
121121
; CHECK-NEXT: ret void
@@ -127,7 +127,7 @@ define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable {
127127
; negative, should not deduce nosync
128128
; atomic load with acquire ordering.
129129
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
131131
; CHECK-LABEL: @load_acquire(
132132
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] acquire, align 4
133133
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -137,7 +137,7 @@ define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable
137137
}
138138

139139
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
141141
; CHECK-LABEL: @load_unordered(
142142
; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] unordered, align 4
143143
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -148,7 +148,7 @@ define i32 @load_unordered(i32* nocapture readonly %0) norecurse nounwind uwtabl
148148

149149
; atomic store with unordered ordering.
150150
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
152152
; CHECK-LABEL: @store_unordered(
153153
; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] unordered, align 4
154154
; CHECK-NEXT: ret void
@@ -161,7 +161,7 @@ define void @store_unordered(i32* nocapture %0) norecurse nounwind uwtable {
161161
; negative, should not deduce nosync
162162
; atomic load with release ordering
163163
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
165165
; CHECK-LABEL: @load_release(
166166
; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4
167167
; CHECK-NEXT: ret void
@@ -172,7 +172,7 @@ define void @load_release(i32* nocapture %0) norecurse nounwind uwtable {
172172

173173
; negative volatile, relaxed atomic
174174
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
176176
; CHECK-LABEL: @load_volatile_release(
177177
; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4
178178
; CHECK-NEXT: ret void
@@ -183,7 +183,7 @@ define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable
183183

184184
; volatile store.
185185
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
187187
; CHECK-LABEL: @volatile_store(
188188
; CHECK-NEXT: store volatile i32 14, i32* [[TMP0:%.*]], align 4
189189
; CHECK-NEXT: ret void
@@ -195,7 +195,7 @@ define void @volatile_store(i32* %0) norecurse nounwind uwtable {
195195
; negative, should not deduce nosync
196196
; volatile load.
197197
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
199199
; CHECK-LABEL: @volatile_load(
200200
; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0:%.*]], align 4
201201
; CHECK-NEXT: ret i32 [[TMP2]]
@@ -237,7 +237,7 @@ declare void @llvm.memset(i8* %dest, i8 %val, i32 %len, i1 %isvolatile)
237237

238238
; negative, checking volatile intrinsics.
239239
define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) {
240-
; CHECK: Function Attrs: nofree nounwind willreturn
240+
; CHECK: Function Attrs: nofree nounwind willreturn mustprogress
241241
; CHECK-LABEL: @memcpy_volatile(
242242
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[PTR1:%.*]], i8* [[PTR2:%.*]], i32 8, i1 true)
243243
; CHECK-NEXT: ret i32 4
@@ -248,7 +248,7 @@ define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) {
248248

249249
; positive, non-volatile intrinsic.
250250
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
252252
; CHECK-LABEL: @memset_non_volatile(
253253
; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* [[PTR1:%.*]], i8 [[VAL:%.*]], i32 8, i1 false)
254254
; CHECK-NEXT: ret i32 4
@@ -299,7 +299,7 @@ define void @i_totally_sync() {
299299
declare float @llvm.cos(float %val) readnone
300300

301301
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
303303
; CHECK-LABEL: @cos_test(
304304
; CHECK-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X:%.*]])
305305
; CHECK-NEXT: ret float [[C]]

0 commit comments

Comments
 (0)