1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[IR] Don't mark mustprogress as type attribute

This is a simple enum attribute.

Test changes are because enum attributes are sorted before type
attributes.
This commit is contained in:
Nikita Popov 2021-07-09 17:58:48 +02:00
parent 5c89cc0c7f
commit 7845932811
18 changed files with 78 additions and 78 deletions

View File

@ -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">;

View File

@ -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.

View File

@ -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:

View File

@ -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 }

View File

@ -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 }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]]

View File

@ -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

View File

@ -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 }

View File

@ -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() #

View File

@ -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

View File

@ -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{{.*}} }

View File

@ -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 }

View File

@ -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

View File

@ -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 {

View File

@ -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*)