diff --git a/include/llvm/IR/Attributes.td b/include/llvm/IR/Attributes.td index b3ea4f0b873..9f44f796060 100644 --- a/include/llvm/IR/Attributes.td +++ b/include/llvm/IR/Attributes.td @@ -266,7 +266,7 @@ def WriteOnly : EnumAttr<"writeonly">; def ZExt : EnumAttr<"zeroext">; /// Function is required to make Forward Progress. -def MustProgress : TypeAttr<"mustprogress">; +def MustProgress : EnumAttr<"mustprogress">; /// Target-independent string attributes. def LessPreciseFPMAD : StrBoolAttr<"less-precise-fpmad">; diff --git a/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll b/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll index 556d721d6b2..7f1841f13f2 100644 --- a/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll +++ b/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll @@ -72,13 +72,13 @@ define i32 @test3_no(i8* %p) nounwind { declare void @callee(i32* %p) nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i1) nounwind -; CHECK: attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress } -; CHECK: attributes #1 = { nofree norecurse nosync nounwind willreturn writeonly mustprogress } +; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn } +; CHECK: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn writeonly } ; CHECK: attributes #2 = { nofree nounwind readonly } ; CHECK: attributes #3 = { nounwind } -; CHECK: attributes #4 = { nofree nosync nounwind readnone willreturn mustprogress } -; CHECK: attributes #5 = { nofree nosync nounwind willreturn mustprogress } -; CHECK: attributes #6 = { nofree norecurse nosync nounwind willreturn mustprogress } +; CHECK: attributes #4 = { mustprogress nofree nosync nounwind readnone willreturn } +; CHECK: attributes #5 = { mustprogress nofree nosync nounwind willreturn } +; CHECK: attributes #6 = { mustprogress nofree norecurse nosync nounwind willreturn } ; CHECK: attributes #7 = { argmemonly nofree nounwind willreturn } ; Root note. diff --git a/test/CodeGen/AMDGPU/inline-attr.ll b/test/CodeGen/AMDGPU/inline-attr.ll index 16e3e5c578f..a65b9a52612 100644 --- a/test/CodeGen/AMDGPU/inline-attr.ll +++ b/test/CodeGen/AMDGPU/inline-attr.ll @@ -6,14 +6,14 @@ ; GCN: define amdgpu_kernel void @caller(float addrspace(1)* nocapture %p) local_unnamed_addr #1 { ; GCN: %mul.i = fmul float %load, 1.500000e+01 -; UNSAFE: attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress "unsafe-fp-math"="true" } -; UNSAFE: attributes #1 = { nofree norecurse nosync nounwind willreturn mustprogress "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="true" } +; UNSAFE: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "unsafe-fp-math"="true" } +; UNSAFE: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="true" } -; NOINFS: attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress "no-infs-fp-math"="true" } -; NOINFS: attributes #1 = { nofree norecurse nosync nounwind willreturn mustprogress "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "unsafe-fp-math"="false" } +; NOINFS: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "no-infs-fp-math"="true" } +; NOINFS: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "unsafe-fp-math"="false" } -; NONANS: attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress "no-nans-fp-math"="true" } -; NONANS: attributes #1 = { nofree norecurse nosync nounwind willreturn mustprogress "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "unsafe-fp-math"="false" } +; NONANS: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "no-nans-fp-math"="true" } +; NONANS: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "unsafe-fp-math"="false" } define float @foo(float %x) #0 { entry: diff --git a/test/Transforms/Attributor/willreturn.ll b/test/Transforms/Attributor/willreturn.ll index d108ba30bc2..c155dab6e68 100644 --- a/test/Transforms/Attributor/willreturn.ll +++ b/test/Transforms/Attributor/willreturn.ll @@ -2140,25 +2140,25 @@ define void @willreturn_mustprogress_caller_1() mustprogress { ret void } define void @willreturn_mustprogress_caller_2() mustprogress { -; IS__TUNIT_OPM: Function Attrs: readonly willreturn mustprogress +; IS__TUNIT_OPM: Function Attrs: mustprogress readonly willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 ; IS__TUNIT_OPM-SAME: () #[[ATTR20:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: call void @readonly() #[[ATTR16:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: readonly willreturn mustprogress +; IS__TUNIT_NPM: Function Attrs: mustprogress readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 ; IS__TUNIT_NPM-SAME: () #[[ATTR22:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: call void @readonly() #[[ATTR18:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: readonly willreturn mustprogress +; IS__CGSCC_OPM: Function Attrs: mustprogress readonly willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 ; IS__CGSCC_OPM-SAME: () #[[ATTR23:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: call void @readonly() #[[ATTR19:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: readonly willreturn mustprogress +; IS__CGSCC_NPM: Function Attrs: mustprogress readonly willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 ; IS__CGSCC_NPM-SAME: () #[[ATTR25:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: call void @readonly() #[[ATTR21:[0-9]+]] @@ -2168,25 +2168,25 @@ define void @willreturn_mustprogress_caller_2() mustprogress { ret void } define void @willreturn_mustprogress_caller_3() mustprogress { -; IS__TUNIT_OPM: Function Attrs: nosync readnone willreturn mustprogress +; IS__TUNIT_OPM: Function Attrs: mustprogress nosync readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 ; IS__TUNIT_OPM-SAME: () #[[ATTR21:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: call void @readnone() ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: nosync readnone willreturn mustprogress +; IS__TUNIT_NPM: Function Attrs: mustprogress nosync readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 ; IS__TUNIT_NPM-SAME: () #[[ATTR23:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: call void @readnone() ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nosync readnone willreturn mustprogress +; IS__CGSCC_OPM: Function Attrs: mustprogress nosync readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 ; IS__CGSCC_OPM-SAME: () #[[ATTR24:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: call void @readnone() ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nosync readnone willreturn mustprogress +; IS__CGSCC_NPM: Function Attrs: mustprogress nosync readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 ; IS__CGSCC_NPM-SAME: () #[[ATTR26:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: call void @readnone() @@ -2290,9 +2290,9 @@ attributes #1 = { uwtable noinline } ; IS__TUNIT_OPM: attributes #[[ATTR16]] = { readonly } ; IS__TUNIT_OPM: attributes #[[ATTR17:[0-9]+]] = { readnone } ; IS__TUNIT_OPM: attributes #[[ATTR18]] = { mustprogress } -; IS__TUNIT_OPM: attributes #[[ATTR19:[0-9]+]] = { readonly mustprogress } -; IS__TUNIT_OPM: attributes #[[ATTR20]] = { readonly willreturn mustprogress } -; IS__TUNIT_OPM: attributes #[[ATTR21]] = { nosync readnone willreturn mustprogress } +; IS__TUNIT_OPM: attributes #[[ATTR19:[0-9]+]] = { mustprogress readonly } +; IS__TUNIT_OPM: attributes #[[ATTR20]] = { mustprogress readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR21]] = { mustprogress nosync readnone willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR22]] = { readonly willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR23]] = { nofree nosync nounwind } ; IS__TUNIT_OPM: attributes #[[ATTR24]] = { readnone willreturn } @@ -2320,9 +2320,9 @@ attributes #1 = { uwtable noinline } ; IS__TUNIT_NPM: attributes #[[ATTR18]] = { readonly } ; IS__TUNIT_NPM: attributes #[[ATTR19:[0-9]+]] = { readnone } ; IS__TUNIT_NPM: attributes #[[ATTR20]] = { mustprogress } -; IS__TUNIT_NPM: attributes #[[ATTR21:[0-9]+]] = { readonly mustprogress } -; IS__TUNIT_NPM: attributes #[[ATTR22]] = { readonly willreturn mustprogress } -; IS__TUNIT_NPM: attributes #[[ATTR23]] = { nosync readnone willreturn mustprogress } +; IS__TUNIT_NPM: attributes #[[ATTR21:[0-9]+]] = { mustprogress readonly } +; IS__TUNIT_NPM: attributes #[[ATTR22]] = { mustprogress readonly willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR23]] = { mustprogress nosync readnone willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR24]] = { readonly willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR25]] = { nofree nosync nounwind } ; IS__TUNIT_NPM: attributes #[[ATTR26]] = { readnone willreturn } @@ -2351,9 +2351,9 @@ attributes #1 = { uwtable noinline } ; IS__CGSCC_OPM: attributes #[[ATTR19]] = { readonly } ; IS__CGSCC_OPM: attributes #[[ATTR20:[0-9]+]] = { readnone } ; IS__CGSCC_OPM: attributes #[[ATTR21]] = { mustprogress } -; IS__CGSCC_OPM: attributes #[[ATTR22:[0-9]+]] = { readonly mustprogress } -; IS__CGSCC_OPM: attributes #[[ATTR23]] = { readonly willreturn mustprogress } -; IS__CGSCC_OPM: attributes #[[ATTR24]] = { nosync readnone willreturn mustprogress } +; IS__CGSCC_OPM: attributes #[[ATTR22:[0-9]+]] = { mustprogress readonly } +; IS__CGSCC_OPM: attributes #[[ATTR23]] = { mustprogress readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR24]] = { mustprogress nosync readnone willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR25]] = { readonly willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR26]] = { nofree nosync nounwind readnone } ; IS__CGSCC_OPM: attributes #[[ATTR27]] = { nofree nosync nounwind } @@ -2386,9 +2386,9 @@ attributes #1 = { uwtable noinline } ; IS__CGSCC_NPM: attributes #[[ATTR21]] = { readonly } ; IS__CGSCC_NPM: attributes #[[ATTR22:[0-9]+]] = { readnone } ; IS__CGSCC_NPM: attributes #[[ATTR23]] = { mustprogress } -; IS__CGSCC_NPM: attributes #[[ATTR24:[0-9]+]] = { readonly mustprogress } -; IS__CGSCC_NPM: attributes #[[ATTR25]] = { readonly willreturn mustprogress } -; IS__CGSCC_NPM: attributes #[[ATTR26]] = { nosync readnone willreturn mustprogress } +; IS__CGSCC_NPM: attributes #[[ATTR24:[0-9]+]] = { mustprogress readonly } +; IS__CGSCC_NPM: attributes #[[ATTR25]] = { mustprogress readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR26]] = { mustprogress nosync readnone willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR27]] = { readonly willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR28]] = { nofree nosync nounwind readnone } ; IS__CGSCC_NPM: attributes #[[ATTR29]] = { nofree nosync nounwind } diff --git a/test/Transforms/FunctionAttrs/atomic.ll b/test/Transforms/FunctionAttrs/atomic.ll index d8f801081b7..da68d8d7f06 100644 --- a/test/Transforms/FunctionAttrs/atomic.ll +++ b/test/Transforms/FunctionAttrs/atomic.ll @@ -20,5 +20,5 @@ entry: ret i32 %r } -; CHECK: attributes #0 = { nofree norecurse nosync nounwind readnone ssp uwtable willreturn mustprogress } -; CHECK: attributes #1 = { nofree norecurse nounwind ssp uwtable willreturn mustprogress } +; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone ssp uwtable willreturn } +; CHECK: attributes #1 = { mustprogress nofree norecurse nounwind ssp uwtable willreturn } diff --git a/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll b/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll index d8e2db15691..24d05684668 100644 --- a/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll +++ b/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll @@ -28,5 +28,5 @@ entry: attributes #0 = { argmemonly } attributes #1 = { inaccessiblememonly } attributes #2 = { inaccessiblemem_or_argmemonly } -; CHECK: attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress } +; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn } ; CHECK-NOT: attributes diff --git a/test/Transforms/FunctionAttrs/nofree-attributor.ll b/test/Transforms/FunctionAttrs/nofree-attributor.ll index 41c19870ba7..30677976260 100644 --- a/test/Transforms/FunctionAttrs/nofree-attributor.ll +++ b/test/Transforms/FunctionAttrs/nofree-attributor.ll @@ -12,7 +12,7 @@ declare void @_ZdaPv(i8*) local_unnamed_addr #2 ; TEST 1 (positive case) -; FNATTR: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable +; FNATTR: Function Attrs: mustprogress nofree noinline norecurse nosync nounwind readnone uwtable ; FNATTR-NEXT: define void @only_return() define void @only_return() #0 { ret void diff --git a/test/Transforms/FunctionAttrs/nofree.ll b/test/Transforms/FunctionAttrs/nofree.ll index 16e8bc25a5c..d58c8bd09a5 100644 --- a/test/Transforms/FunctionAttrs/nofree.ll +++ b/test/Transforms/FunctionAttrs/nofree.ll @@ -36,7 +36,7 @@ entry: declare void @free(i8* nocapture) local_unnamed_addr #2 define i32 @_Z4foo3Pi(i32* nocapture readonly %a) local_unnamed_addr #3 { -; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly uwtable willreturn +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readonly uwtable willreturn ; CHECK-LABEL: @_Z4foo3Pi( ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A:%.*]], align 4 diff --git a/test/Transforms/FunctionAttrs/nosync.ll b/test/Transforms/FunctionAttrs/nosync.ll index 6c3bc7b26d4..2842d24a929 100644 --- a/test/Transforms/FunctionAttrs/nosync.ll +++ b/test/Transforms/FunctionAttrs/nosync.ll @@ -6,7 +6,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; Base case, empty function define void @test1() { -; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn ; CHECK-LABEL: @test1( ; CHECK-NEXT: ret void ; @@ -15,7 +15,7 @@ define void @test1() { ; Show the bottom up walk define void @test2() { -; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn ; CHECK-LABEL: @test2( ; CHECK-NEXT: call void @test1() ; CHECK-NEXT: ret void @@ -38,7 +38,7 @@ define void @test3() convergent { } define i32 @test4(i32 %a, i32 %b) { -; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn ; CHECK-LABEL: @test4( ; CHECK-NEXT: [[ADD:%.*]] = add i32 [[A:%.*]], [[B:%.*]] ; CHECK-NEXT: ret i32 [[A]] @@ -49,7 +49,7 @@ define i32 @test4(i32 %a, i32 %b) { ; negative case - explicit sync define void @test5(i8* %p) { -; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn ; CHECK-LABEL: @test5( ; CHECK-NEXT: store atomic i8 0, i8* [[P:%.*]] seq_cst, align 1 ; CHECK-NEXT: ret void @@ -60,7 +60,7 @@ define void @test5(i8* %p) { ; negative case - explicit sync define i8 @test6(i8* %p) { -; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn ; CHECK-LABEL: @test6( ; CHECK-NEXT: [[V:%.*]] = load atomic i8, i8* [[P:%.*]] seq_cst, align 1 ; CHECK-NEXT: ret i8 [[V]] @@ -71,7 +71,7 @@ define i8 @test6(i8* %p) { ; negative case - explicit sync define void @test7(i8* %p) { -; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn ; CHECK-LABEL: @test7( ; CHECK-NEXT: [[TMP1:%.*]] = atomicrmw add i8* [[P:%.*]], i8 0 seq_cst, align 1 ; CHECK-NEXT: ret void @@ -82,7 +82,7 @@ define void @test7(i8* %p) { ; negative case - explicit sync define void @test8(i8* %p) { -; CHECK: Function Attrs: nofree norecurse nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn ; CHECK-LABEL: @test8( ; CHECK-NEXT: fence seq_cst ; CHECK-NEXT: ret void @@ -93,7 +93,7 @@ define void @test8(i8* %p) { ; singlethread fences are okay define void @test9(i8* %p) { -; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn ; CHECK-LABEL: @test9( ; CHECK-NEXT: fence syncscope("singlethread") seq_cst ; CHECK-NEXT: ret void @@ -104,7 +104,7 @@ define void @test9(i8* %p) { ; atomic load with monotonic ordering define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @load_monotonic( ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] monotonic, align 4 ; CHECK-NEXT: ret i32 [[TMP2]] @@ -115,7 +115,7 @@ define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtabl ; atomic store with monotonic ordering. define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @store_monotonic( ; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] monotonic, align 4 ; CHECK-NEXT: ret void @@ -127,7 +127,7 @@ define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable { ; negative, should not deduce nosync ; atomic load with acquire ordering. define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @load_acquire( ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] acquire, align 4 ; CHECK-NEXT: ret i32 [[TMP2]] @@ -137,7 +137,7 @@ define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable } define i32 @load_unordered(i32* nocapture readonly %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readonly uwtable willreturn ; CHECK-LABEL: @load_unordered( ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0:%.*]] unordered, align 4 ; CHECK-NEXT: ret i32 [[TMP2]] @@ -148,7 +148,7 @@ define i32 @load_unordered(i32* nocapture readonly %0) norecurse nounwind uwtabl ; atomic store with unordered ordering. define void @store_unordered(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn writeonly mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind uwtable willreturn writeonly ; CHECK-LABEL: @store_unordered( ; CHECK-NEXT: store atomic i32 10, i32* [[TMP0:%.*]] unordered, align 4 ; CHECK-NEXT: ret void @@ -161,7 +161,7 @@ define void @store_unordered(i32* nocapture %0) norecurse nounwind uwtable { ; negative, should not deduce nosync ; atomic load with release ordering define void @load_release(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @load_release( ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4 ; CHECK-NEXT: ret void @@ -172,7 +172,7 @@ define void @load_release(i32* nocapture %0) norecurse nounwind uwtable { ; negative volatile, relaxed atomic define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @load_volatile_release( ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0:%.*]] release, align 4 ; CHECK-NEXT: ret void @@ -183,7 +183,7 @@ define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable ; volatile store. define void @volatile_store(i32* %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @volatile_store( ; CHECK-NEXT: store volatile i32 14, i32* [[TMP0:%.*]], align 4 ; CHECK-NEXT: ret void @@ -195,7 +195,7 @@ define void @volatile_store(i32* %0) norecurse nounwind uwtable { ; negative, should not deduce nosync ; volatile load. define i32 @volatile_load(i32* %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: @volatile_load( ; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0:%.*]], align 4 ; CHECK-NEXT: ret i32 [[TMP2]] @@ -237,7 +237,7 @@ declare void @llvm.memset(i8* %dest, i8 %val, i32 %len, i1 %isvolatile) ; negative, checking volatile intrinsics. define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) { -; CHECK: Function Attrs: nofree nounwind willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree nounwind willreturn ; CHECK-LABEL: @memcpy_volatile( ; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* [[PTR1:%.*]], i8* [[PTR2:%.*]], i32 8, i1 true) ; CHECK-NEXT: ret i32 4 @@ -248,7 +248,7 @@ define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) { ; positive, non-volatile intrinsic. define i32 @memset_non_volatile(i8* %ptr1, i8 %val) { -; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress +; CHECK: Function Attrs: mustprogress nofree nosync nounwind willreturn writeonly ; CHECK-LABEL: @memset_non_volatile( ; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* [[PTR1:%.*]], i8 [[VAL:%.*]], i32 8, i1 false) ; CHECK-NEXT: ret i32 4 @@ -299,7 +299,7 @@ define void @i_totally_sync() { declare float @llvm.cos(float %val) readnone define float @cos_test(float %x) { -; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree nosync nounwind readnone willreturn ; CHECK-LABEL: @cos_test( ; CHECK-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X:%.*]]) ; CHECK-NEXT: ret float [[C]] diff --git a/test/Transforms/FunctionAttrs/nounwind.ll b/test/Transforms/FunctionAttrs/nounwind.ll index 02c1bb4fd15..f03bf051103 100644 --- a/test/Transforms/FunctionAttrs/nounwind.ll +++ b/test/Transforms/FunctionAttrs/nounwind.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -function-attrs -S | FileCheck %s ; TEST 1 -; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone +; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind readnone ; CHECK-NEXT: define i32 @foo1() define i32 @foo1() { ret i32 1 diff --git a/test/Transforms/FunctionAttrs/optnone.ll b/test/Transforms/FunctionAttrs/optnone.ll index 57b9b82291d..6d8a1d58f14 100644 --- a/test/Transforms/FunctionAttrs/optnone.ll +++ b/test/Transforms/FunctionAttrs/optnone.ll @@ -20,6 +20,6 @@ declare i8 @strlen(i8*) noinline optnone ; CHECK: (i8*) #1 ; CHECK-LABEL: attributes #0 -; CHECK: = { nofree norecurse nosync nounwind readnone willreturn mustprogress } +; CHECK: = { mustprogress nofree norecurse nosync nounwind readnone willreturn } ; CHECK-LABEL: attributes #1 ; CHECK: = { noinline optnone } diff --git a/test/Transforms/FunctionAttrs/willreturn-callsites.ll b/test/Transforms/FunctionAttrs/willreturn-callsites.ll index 1dbeffc927c..d070763b244 100644 --- a/test/Transforms/FunctionAttrs/willreturn-callsites.ll +++ b/test/Transforms/FunctionAttrs/willreturn-callsites.ll @@ -22,7 +22,7 @@ define void @test_fn_mustprogress(i32* %ptr) mustprogress { } define void @test_fn_willreturn(i32* %ptr) willreturn { -; CHECK: Function Attrs: willreturn +; CHECK: Function Attrs: mustprogress willreturn ; CHECK-LABEL: @test_fn_willreturn( ; CHECK-NOT: call void @decl_readonly() # ; CHECK-NOT : call void @decl_readnone() # @@ -38,7 +38,7 @@ define void @test_fn_willreturn(i32* %ptr) willreturn { } define void @test_fn_mustprogress_readonly_calls(i32* %ptr) mustprogress { -; CHECK: Function Attrs: nofree readonly willreturn mustprogress +; CHECK: Function Attrs: mustprogress nofree readonly willreturn ; CHECK-LABEL: @test_fn_mustprogress_readonly_calls( ; CHECK-NOT: call void @decl_readonly() # ; CHECK-NOT: call void @decl_readnone() # @@ -50,7 +50,7 @@ define void @test_fn_mustprogress_readonly_calls(i32* %ptr) mustprogress { } define void @test_fn_mustprogress_readonly_calls_but_stores(i32* %ptr) mustprogress { -; CHECK: Function Attrs: nofree mustprogress +; CHECK: Function Attrs: mustprogress nofree ; CHECK-LABEL: @test_fn_mustprogress_readonly_calls_but_stores( ; CHECK-NOT: call void @decl_readonly() # ; CHECK-NOT: call void @decl_readnone() # diff --git a/test/Transforms/FunctionAttrs/willreturn.ll b/test/Transforms/FunctionAttrs/willreturn.ll index 35f48e7a344..0465311926a 100644 --- a/test/Transforms/FunctionAttrs/willreturn.ll +++ b/test/Transforms/FunctionAttrs/willreturn.ll @@ -73,7 +73,7 @@ B: ; Function without loops or non-willreturn calls will return. define void @willreturn_no_loop(i1 %c, i32* %p) { -; CHECK: Function Attrs: willreturn +; CHECK: Function Attrs: mustprogress willreturn ; CHECK-NEXT: define void @willreturn_no_loop( ; br i1 %c, label %if, label %else diff --git a/test/Transforms/FunctionAttrs/writeonly.ll b/test/Transforms/FunctionAttrs/writeonly.ll index 1aaae3a275f..db9f49bc9e4 100644 --- a/test/Transforms/FunctionAttrs/writeonly.ll +++ b/test/Transforms/FunctionAttrs/writeonly.ll @@ -25,6 +25,6 @@ nouses-argworn-funwo_entry: ret void } -; CHECK: attributes #0 = { {{.*}} readnone {{.*}} } -; CHECK: attributes #1 = { {{.*}} readonly {{.*}} } -; CHECK: attributes #2 = { {{.*}} writeonly {{.*}} } +; CHECK: attributes #0 = { {{.*}}readnone{{.*}} } +; CHECK: attributes #1 = { {{.*}}readonly{{.*}} } +; CHECK: attributes #2 = { {{.*}}writeonly{{.*}} } diff --git a/test/Transforms/InferFunctionAttrs/annotate.ll b/test/Transforms/InferFunctionAttrs/annotate.ll index 3b374d473a2..31656e2bb29 100644 --- a/test/Transforms/InferFunctionAttrs/annotate.ll +++ b/test/Transforms/InferFunctionAttrs/annotate.ll @@ -1016,18 +1016,18 @@ declare i64 @write(i32, i8*, i64) declare void @memset_pattern16(i8*, i8*, i64) -; CHECK-DAG: attributes [[NOFREE_NOUNWIND_WILLRETURN]] = { nofree nounwind willreturn mustprogress } +; CHECK-DAG: attributes [[NOFREE_NOUNWIND_WILLRETURN]] = { mustprogress nofree nounwind willreturn } ; CHECK-DAG: attributes [[NOFREE_NOUNWIND]] = { nofree nounwind } -; CHECK-DAG: attributes [[INACCESSIBLEMEMONLY_NOFREE_NOUNWIND_WILLRETURN]] = { inaccessiblememonly nofree nounwind willreturn mustprogress } -; CHECK-DAG: attributes [[NOFREE_NOUNWIND_READONLY_WILLRETURN]] = { nofree nounwind readonly willreturn mustprogress } -; CHECK-DAG: attributes [[ARGMEMONLY_NOFREE_NOUNWIND_WILLRETURN]] = { argmemonly nofree nounwind willreturn mustprogress } +; CHECK-DAG: attributes [[INACCESSIBLEMEMONLY_NOFREE_NOUNWIND_WILLRETURN]] = { inaccessiblememonly mustprogress nofree nounwind willreturn } +; CHECK-DAG: attributes [[NOFREE_NOUNWIND_READONLY_WILLRETURN]] = { mustprogress nofree nounwind readonly willreturn } +; CHECK-DAG: attributes [[ARGMEMONLY_NOFREE_NOUNWIND_WILLRETURN]] = { argmemonly mustprogress nofree nounwind willreturn } ; CHECK-DAG: attributes [[NOFREE_NOUNWIND_READONLY]] = { nofree nounwind readonly } -; CHECK-DAG: attributes [[INACCESSIBLEMEMORARGMEMONLY_NOUNWIND_WILLRETURN]] = { inaccessiblemem_or_argmemonly nounwind willreturn mustprogress } -; CHECK-DAG: attributes [[NOFREE_WILLRETURN]] = { nofree willreturn mustprogress } -; CHECK-DAG: attributes [[ARGMEMONLY_NOFREE_NOUNWIND_READONLY_WILLRETURN]] = { argmemonly nofree nounwind readonly willreturn mustprogress } +; CHECK-DAG: attributes [[INACCESSIBLEMEMORARGMEMONLY_NOUNWIND_WILLRETURN]] = { inaccessiblemem_or_argmemonly mustprogress nounwind willreturn } +; CHECK-DAG: attributes [[NOFREE_WILLRETURN]] = { mustprogress nofree willreturn } +; CHECK-DAG: attributes [[ARGMEMONLY_NOFREE_NOUNWIND_READONLY_WILLRETURN]] = { argmemonly mustprogress nofree nounwind readonly willreturn } ; CHECK-DAG: attributes [[NOFREE]] = { nofree } -; CHECK-DAG: attributes [[WILLRETURN]] = { willreturn mustprogress } -; CHECK-DAG: attributes [[INACCESSIBLEMEMORARGONLY_NOFREE_NOUNWIND_WILLRETURN]] = { inaccessiblemem_or_argmemonly nofree nounwind willreturn mustprogress } +; CHECK-DAG: attributes [[WILLRETURN]] = { mustprogress willreturn } +; CHECK-DAG: attributes [[INACCESSIBLEMEMORARGONLY_NOFREE_NOUNWIND_WILLRETURN]] = { inaccessiblemem_or_argmemonly mustprogress nofree nounwind willreturn } ; CHECK-DARWIN-DAG: attributes [[ARGMEMONLY_NOFREE]] = { argmemonly nofree } ; CHECK-NVPTX-DAG: attributes [[NOFREE_NOUNWIND_READNONE]] = { nofree nosync nounwind readnone } diff --git a/test/Transforms/InferFunctionAttrs/norecurse_debug.ll b/test/Transforms/InferFunctionAttrs/norecurse_debug.ll index 6b475103dad..9b90f59d360 100644 --- a/test/Transforms/InferFunctionAttrs/norecurse_debug.ll +++ b/test/Transforms/InferFunctionAttrs/norecurse_debug.ll @@ -52,5 +52,5 @@ attributes #1 = { nounwind readnone speculatable } !28 = !DILocation(line: 9, column: 18, scope: !2) !29 = !DILocation(line: 10, column: 1, scope: !2) -; CHECK: attributes #0 = { nofree norecurse nosync nounwind willreturn mustprogress } +; CHECK: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn } ; CHECK-NOT: foo.coefficient1 diff --git a/test/Transforms/Inline/always-inline-attr.ll b/test/Transforms/Inline/always-inline-attr.ll index eb51f2be72f..d411b962521 100644 --- a/test/Transforms/Inline/always-inline-attr.ll +++ b/test/Transforms/Inline/always-inline-attr.ll @@ -7,7 +7,7 @@ target triple = "x86_64-grtev4-linux-gnu" ; After AlwaysInline the callee's attributes should be merged into caller's attibutes. ; CHECK: define dso_local <2 x i64> @foo(<8 x i64>* byval(<8 x i64>) align 64 %0) #0 -; CHECK: attributes #0 = { uwtable mustprogress "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="512" +; CHECK: attributes #0 = { mustprogress uwtable "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="512" ; Function Attrs: uwtable mustprogress define dso_local <2 x i64> @foo(<8 x i64>* byval(<8 x i64>) align 64 %0) #0 { diff --git a/test/Transforms/LICM/strlen.ll b/test/Transforms/LICM/strlen.ll index 4a45a06f82f..d14a082d3c4 100644 --- a/test/Transforms/LICM/strlen.ll +++ b/test/Transforms/LICM/strlen.ll @@ -13,7 +13,7 @@ loop: } ; CHECK: declare i64 @strlen(i8* nocapture) #0 -; CHECK: attributes #0 = { argmemonly nofree nounwind readonly willreturn mustprogress } +; CHECK: attributes #0 = { argmemonly mustprogress nofree nounwind readonly willreturn } declare i64 @strlen(i8*)