[llvm] ff8b1b1 - Reapply [IR] Don't mark mustprogress as type attribute

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 11:58:19 PDT 2021


Author: Nikita Popov
Date: 2021-07-09T20:57:44+02:00
New Revision: ff8b1b1b9caef57046bda1ca36c95f0e03527c6e

URL: https://github.com/llvm/llvm-project/commit/ff8b1b1b9caef57046bda1ca36c95f0e03527c6e
DIFF: https://github.com/llvm/llvm-project/commit/ff8b1b1b9caef57046bda1ca36c95f0e03527c6e.diff

LOG: Reapply [IR] Don't mark mustprogress as type attribute

Reapply with fixes for clang tests.

-----

This is a simple enum attribute. Test changes are because enum
attributes are sorted before type attributes, so mustprogress is
now in a different position.

Added: 
    

Modified: 
    clang/test/CodeGen/address-safety-attr-flavors.cpp
    clang/test/CodeGen/address-safety-attr.cpp
    clang/test/CodeGen/memtag-attr.cpp
    clang/test/CodeGen/noduplicate-cxx11-test.cpp
    clang/test/CodeGen/sanitize-thread-attr.cpp
    clang/test/CodeGenCXX/attr.cpp
    clang/test/CodeGenCXX/cxx11-exception-spec.cpp
    clang/test/CodeGenCXX/cxx11-noreturn.cpp
    clang/test/CodeGenCXX/derived-to-base.cpp
    clang/test/CodeGenCXX/inline-hint.cpp
    clang/test/CodeGenCXX/main-norecurse.cpp
    clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
    clang/test/CodeGenCXX/no-exceptions.cpp
    clang/test/CodeGenCXX/noinline-template.cpp
    clang/test/CodeGenCXX/optnone-and-attributes.cpp
    clang/test/CodeGenCXX/optnone-def-decl.cpp
    clang/test/CodeGenCXX/reference-cast.cpp
    clang/test/CodeGenCXX/threadsafe-statics.cpp
    clang/test/CodeGenCXX/virtual-base-cast.cpp
    clang/test/CodeGenObjC/objc-literal-tests.m
    clang/test/CodeGenObjCXX/lambda-expressions.mm
    clang/test/CodeGenOpenCL/convergent.cl
    clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
    llvm/include/llvm/IR/Attributes.td
    llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
    llvm/test/CodeGen/AMDGPU/inline-attr.ll
    llvm/test/Transforms/Attributor/willreturn.ll
    llvm/test/Transforms/FunctionAttrs/atomic.ll
    llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
    llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
    llvm/test/Transforms/FunctionAttrs/nofree.ll
    llvm/test/Transforms/FunctionAttrs/nosync.ll
    llvm/test/Transforms/FunctionAttrs/nounwind.ll
    llvm/test/Transforms/FunctionAttrs/optnone.ll
    llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
    llvm/test/Transforms/FunctionAttrs/willreturn.ll
    llvm/test/Transforms/FunctionAttrs/writeonly.ll
    llvm/test/Transforms/InferFunctionAttrs/annotate.ll
    llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
    llvm/test/Transforms/Inline/always-inline-attr.ll
    llvm/test/Transforms/LICM/strlen.ll

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/address-safety-attr-flavors.cpp b/clang/test/CodeGen/address-safety-attr-flavors.cpp
index ac575ede0461..e6d17ed2da34 100644
--- a/clang/test/CodeGen/address-safety-attr-flavors.cpp
+++ b/clang/test/CodeGen/address-safety-attr-flavors.cpp
@@ -25,51 +25,51 @@
 // RUN:   FileCheck -check-prefix=CHECK-KHWASAN %s
 
 int HasSanitizeAddress() { return 1; }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: Function Attrs: noinline nounwind sanitize_address mustprogress
-// CHECK-KASAN: Function Attrs: noinline nounwind sanitize_address mustprogress
-// CHECK-HWASAN: Function Attrs: noinline nounwind sanitize_hwaddress mustprogress
-// CHECK-KHWASAN: Function Attrs: noinline nounwind sanitize_hwaddress mustprogress
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: Function Attrs: mustprogress noinline nounwind sanitize_address
+// CHECK-KASAN: Function Attrs: mustprogress noinline nounwind sanitize_address
+// CHECK-HWASAN: Function Attrs: mustprogress noinline nounwind sanitize_hwaddress
+// CHECK-KHWASAN: Function Attrs: mustprogress noinline nounwind sanitize_hwaddress
 
 __attribute__((no_sanitize("address"))) int NoSanitizeQuoteAddress() {
   return 0;
 }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-KASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-HWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
-// CHECK-KHWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-KASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-HWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
+// CHECK-KHWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
 
 __attribute__((no_sanitize_address)) int NoSanitizeAddress() { return 0; }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-KASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-HWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
-// CHECK-KHWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-KASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-HWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
+// CHECK-KHWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
 
 __attribute__((no_sanitize("kernel-address"))) int NoSanitizeKernelAddress() {
   return 0;
 }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-KASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-HWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
-// CHECK-KHWASAN: {{Function Attrs: noinline nounwind sanitize_hwaddress mustprogress$}}
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-KASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-HWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
+// CHECK-KHWASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_hwaddress$}}
 
 __attribute__((no_sanitize("hwaddress"))) int NoSanitizeHWAddress() {
   return 0;
 }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: {{Function Attrs: noinline nounwind sanitize_address mustprogress$}}
-// CHECK-KASAN: {{Function Attrs: noinline nounwind sanitize_address mustprogress$}}
-// CHECK-HWASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-KHWASAN: {{Function Attrs: noinline nounwind mustprogress$}}
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_address$}}
+// CHECK-KASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_address$}}
+// CHECK-HWASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-KHWASAN: {{Function Attrs: mustprogress noinline nounwind$}}
 
 __attribute__((no_sanitize("kernel-hwaddress"))) int NoSanitizeKernelHWAddress() {
   return 0;
 }
-// CHECK-NOASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-ASAN: {{Function Attrs: noinline nounwind sanitize_address mustprogress$}}
-// CHECK-KASAN: {{Function Attrs: noinline nounwind sanitize_address mustprogress$}}
-// CHECK-HWASAN: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-KHWASAN: {{Function Attrs: noinline nounwind mustprogress$}}
+// CHECK-NOASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-ASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_address$}}
+// CHECK-KASAN: {{Function Attrs: mustprogress noinline nounwind sanitize_address$}}
+// CHECK-HWASAN: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-KHWASAN: {{Function Attrs: mustprogress noinline nounwind$}}

diff  --git a/clang/test/CodeGen/address-safety-attr.cpp b/clang/test/CodeGen/address-safety-attr.cpp
index 90e60f7fb7fd..742263ae353d 100644
--- a/clang/test/CodeGen/address-safety-attr.cpp
+++ b/clang/test/CodeGen/address-safety-attr.cpp
@@ -148,7 +148,7 @@ int global2 = *(int*)((char*)&global1+1);
 // BLFILE: attributes [[NOATTR]] = { noinline nounwind{{.*}} }
 
 // BLFUNC: attributes [[WITH]] = { noinline nounwind sanitize_address{{.*}} }
-// BLFUNC: attributes [[NOATTR]] = { noinline nounwind{{.*}} }
+// BLFUNC: attributes [[NOATTR]] = { mustprogress noinline nounwind{{.*}} }
 
 // ASAN: attributes [[WITH]] = { noinline nounwind sanitize_address{{.*}} }
-// ASAN: attributes [[NOATTR]] = { noinline nounwind{{.*}} }
+// ASAN: attributes [[NOATTR]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGen/memtag-attr.cpp b/clang/test/CodeGen/memtag-attr.cpp
index 33c22a2d9165..924a7ccf2140 100644
--- a/clang/test/CodeGen/memtag-attr.cpp
+++ b/clang/test/CodeGen/memtag-attr.cpp
@@ -9,11 +9,11 @@
 // RUN:   FileCheck -check-prefix=CHECK-MEMTAG %s
 
 int HasSanitizeMemTag() { return 1; }
-// CHECK-NO: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-MEMTAG: Function Attrs: noinline nounwind sanitize_memtag
+// CHECK-NO: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-MEMTAG: Function Attrs: mustprogress noinline nounwind sanitize_memtag
 
 __attribute__((no_sanitize("memtag"))) int NoSanitizeQuoteAddress() {
   return 0;
 }
-// CHECK-NO: {{Function Attrs: noinline nounwind mustprogress$}}
-// CHECK-MEMTAG: {{Function Attrs: noinline nounwind mustprogress$}}
+// CHECK-NO: {{Function Attrs: mustprogress noinline nounwind$}}
+// CHECK-MEMTAG: {{Function Attrs: mustprogress noinline nounwind$}}

diff  --git a/clang/test/CodeGen/noduplicate-cxx11-test.cpp b/clang/test/CodeGen/noduplicate-cxx11-test.cpp
index aca7a910764f..0033192b4053 100644
--- a/clang/test/CodeGen/noduplicate-cxx11-test.cpp
+++ b/clang/test/CodeGen/noduplicate-cxx11-test.cpp
@@ -17,4 +17,4 @@ int main() {
 
 }
 
-// CHECK: attributes [[NI]] = { noduplicate {{.*}}nounwind{{.*}} }
+// CHECK: attributes [[NI]] = { {{.*}}noduplicate {{.*}}nounwind{{.*}} }

diff  --git a/clang/test/CodeGen/sanitize-thread-attr.cpp b/clang/test/CodeGen/sanitize-thread-attr.cpp
index 4e0e28e5e304..e0b13e86de4c 100644
--- a/clang/test/CodeGen/sanitize-thread-attr.cpp
+++ b/clang/test/CodeGen/sanitize-thread-attr.cpp
@@ -58,5 +58,5 @@ int global2 = *(int*)((char*)&global1+1);
 
 // BL: attributes [[NOATTR]] = { noinline nounwind{{.*}} }
 
-// TSAN: attributes [[NOATTR]] = { noinline nounwind{{.*}} }
+// TSAN: attributes [[NOATTR]] = { mustprogress noinline nounwind{{.*}} }
 // TSAN: attributes [[WITH]] = { noinline nounwind sanitize_thread{{.*}} }

diff  --git a/clang/test/CodeGenCXX/attr.cpp b/clang/test/CodeGenCXX/attr.cpp
index 50b6459a3b12..0a27e3c0e2ae 100644
--- a/clang/test/CodeGenCXX/attr.cpp
+++ b/clang/test/CodeGenCXX/attr.cpp
@@ -31,4 +31,4 @@ int test1() { return 10; }
 // CHECK at top of file
 extern "C" int test2() __attribute__((alias("_Z5test1v")));
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { {{.*}}noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
index fbff07802676..dd9e6562ad3a 100644
--- a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
+++ b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
@@ -121,7 +121,7 @@ void j() {
 }
 
 // CHECK: attributes [[NONE]] = { {{.*}} }
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }
 // CHECK: attributes [[NUW2]] = { nounwind{{.*}} }
 
 

diff  --git a/clang/test/CodeGenCXX/cxx11-noreturn.cpp b/clang/test/CodeGenCXX/cxx11-noreturn.cpp
index 58a5a377133a..feea72ef3f45 100644
--- a/clang/test/CodeGenCXX/cxx11-noreturn.cpp
+++ b/clang/test/CodeGenCXX/cxx11-noreturn.cpp
@@ -7,4 +7,4 @@ int g();
   while (g()) {}
 }
 
-// CHECK: attributes [[NR]] = { noinline noreturn nounwind{{.*}} }
+// CHECK: attributes [[NR]] = { mustprogress noinline noreturn nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/derived-to-base.cpp b/clang/test/CodeGenCXX/derived-to-base.cpp
index 34a020beb0b4..19aed059c55f 100644
--- a/clang/test/CodeGenCXX/derived-to-base.cpp
+++ b/clang/test/CodeGenCXX/derived-to-base.cpp
@@ -46,4 +46,4 @@ namespace test3 {
   }
 }
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/inline-hint.cpp b/clang/test/CodeGenCXX/inline-hint.cpp
index e8c067dec174..9800a765c6cb 100644
--- a/clang/test/CodeGenCXX/inline-hint.cpp
+++ b/clang/test/CodeGenCXX/inline-hint.cpp
@@ -78,19 +78,19 @@ void foo()
 }
 
 // SUITABLE-NOT: attributes [[NOHINT_ATTR]] = { {{.*}}noinline{{.*}} }
-//   HINTED-DAG: attributes [[NOHINT_ATTR]] = { noinline{{.*}} }
-// NOINLINE-DAG: attributes [[NOHINT_ATTR]] = { noinline{{.*}} }
+//   HINTED-DAG: attributes [[NOHINT_ATTR]] = { {{.*}}noinline{{.*}} }
+// NOINLINE-DAG: attributes [[NOHINT_ATTR]] = { {{.*}}noinline{{.*}} }
 
 // SUITABLE-NOT: attributes [[IMPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
 //   HINTED-NOT: attributes [[IMPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
-// NOINLINE-DAG: attributes [[IMPLICIT_ATTR]] = { noinline{{.*}} }
+// NOINLINE-DAG: attributes [[IMPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
 
 // SUITABLE-NOT: attributes [[IMPLICIT_CONSTR_ATTR]] = { {{.*}}noinline{{.*}} }
 //   HINTED-NOT: attributes [[IMPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
-// NOINLINE-DAG: attributes [[IMPLICIT_CONSTR_ATTR]] = { noinline{{.*}} }
+// NOINLINE-DAG: attributes [[IMPLICIT_CONSTR_ATTR]] = { {{.*}}noinline{{.*}} }
 
 // SUITABLE-NOT: attributes [[EXPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
 //   HINTED-NOT: attributes [[IMPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
-// NOINLINE-DAG: attributes [[EXPLICIT_ATTR]] = { noinline{{.*}} }
+// NOINLINE-DAG: attributes [[EXPLICIT_ATTR]] = { {{.*}}noinline{{.*}} }
 
-// CHECK-DAG: attributes [[OPTNONE_ATTR]] = { noinline{{.*}} }
+// CHECK-DAG: attributes [[OPTNONE_ATTR]] = { {{.*}}noinline{{.*}} }

diff  --git a/clang/test/CodeGenCXX/main-norecurse.cpp b/clang/test/CodeGenCXX/main-norecurse.cpp
index a98677ce6f59..3a476e6a119a 100644
--- a/clang/test/CodeGenCXX/main-norecurse.cpp
+++ b/clang/test/CodeGenCXX/main-norecurse.cpp
@@ -5,4 +5,4 @@ int main(int argc, char **argv) {
     return 1;
 }
 
-// CHECK: attributes #0 = { noinline norecurse{{.*}} }
+// CHECK: attributes #0 = { mustprogress noinline norecurse{{.*}} }

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp b/clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
index 52207b33b87c..c500a83a198c 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
@@ -68,4 +68,4 @@ struct S {
 void delete_s(S *s) { delete[] s; }
 }
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/no-exceptions.cpp b/clang/test/CodeGenCXX/no-exceptions.cpp
index 41d72d6c4f04..52ce0baa3174 100644
--- a/clang/test/CodeGenCXX/no-exceptions.cpp
+++ b/clang/test/CodeGenCXX/no-exceptions.cpp
@@ -11,4 +11,4 @@ void f() throw (int) {
   // CHECK: ret void
 }
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/noinline-template.cpp b/clang/test/CodeGenCXX/noinline-template.cpp
index 2f177cb055e6..d14cf8ad7e3f 100644
--- a/clang/test/CodeGenCXX/noinline-template.cpp
+++ b/clang/test/CodeGenCXX/noinline-template.cpp
@@ -15,4 +15,4 @@ void foo() {
  strs.growStorageBy();
 }
 
-// CHECK: attributes [[NI]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NI]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/optnone-and-attributes.cpp b/clang/test/CodeGenCXX/optnone-and-attributes.cpp
index 870d5e9496f0..68aa0988b18b 100644
--- a/clang/test/CodeGenCXX/optnone-and-attributes.cpp
+++ b/clang/test/CodeGenCXX/optnone-and-attributes.cpp
@@ -75,8 +75,8 @@ int exported_optnone_func(int a) {
 // CHECK: declare dllimport {{.*}} @_Z21imported_optnone_funci({{.*}}) [[DLLIMPORT:#[0-9]+]]
 
 
-// CHECK: attributes [[OPTNONE]] = { noinline {{.*}} optnone
-// CHECK: attributes [[NORETURN]] = { noinline noreturn {{.*}} optnone
+// CHECK: attributes [[OPTNONE]] = { mustprogress noinline {{.*}} optnone
+// CHECK: attributes [[NORETURN]] = { mustprogress noinline noreturn {{.*}} optnone
 
 // CHECK: attributes [[DLLIMPORT]] =
 // CHECK-NOT: optnone

diff  --git a/clang/test/CodeGenCXX/optnone-def-decl.cpp b/clang/test/CodeGenCXX/optnone-def-decl.cpp
index 6e4e510b9bf6..9e7d295ea31d 100644
--- a/clang/test/CodeGenCXX/optnone-def-decl.cpp
+++ b/clang/test/CodeGenCXX/optnone-def-decl.cpp
@@ -89,7 +89,7 @@ int user_of_forceinline_optnone_function() {
 // CHECK: @_Z36user_of_forceinline_optnone_functionv() [[NORMAL]]
 // CHECK: @_Z28forceinline_optnone_functionii({{.*}}) [[OPTNONE]]
 
-// CHECK: attributes [[OPTNONE]] = { noinline nounwind optnone {{.*}} }
+// CHECK: attributes [[OPTNONE]] = { mustprogress noinline nounwind optnone {{.*}} }
 // CHECK: attributes [[NORMAL]] =
 // CHECK-NOT: noinline
 // CHECK-NOT: optnone

diff  --git a/clang/test/CodeGenCXX/reference-cast.cpp b/clang/test/CodeGenCXX/reference-cast.cpp
index a7a4f3114935..4f27ecd1cb71 100644
--- a/clang/test/CodeGenCXX/reference-cast.cpp
+++ b/clang/test/CodeGenCXX/reference-cast.cpp
@@ -193,4 +193,4 @@ namespace PR10650 {
   // CHECK: store i64
 }
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/threadsafe-statics.cpp b/clang/test/CodeGenCXX/threadsafe-statics.cpp
index 443fbecc3d26..4c53482d4c4c 100644
--- a/clang/test/CodeGenCXX/threadsafe-statics.cpp
+++ b/clang/test/CodeGenCXX/threadsafe-statics.cpp
@@ -22,6 +22,6 @@ void g() {
 // NO-TSS-NOT: call void @__cxa_guard_release
 // NO-TSS: ret void
 
-// WITH-TSS: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// WITH-TSS: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }
 
-// NO-TSS: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// NO-TSS: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenCXX/virtual-base-cast.cpp b/clang/test/CodeGenCXX/virtual-base-cast.cpp
index d3a799933db4..8eb6c63192eb 100644
--- a/clang/test/CodeGenCXX/virtual-base-cast.cpp
+++ b/clang/test/CodeGenCXX/virtual-base-cast.cpp
@@ -82,4 +82,4 @@ BB* d() { return y; }
 // MSVC:   add nsw i32 4, %[[offset]]
 // MSVC: }
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenObjC/objc-literal-tests.m b/clang/test/CodeGenObjC/objc-literal-tests.m
index 5b7a29ad6efc..4cb152d1dd3d 100644
--- a/clang/test/CodeGenObjC/objc-literal-tests.m
+++ b/clang/test/CodeGenObjC/objc-literal-tests.m
@@ -94,4 +94,4 @@ void baz(void) {
   bar(^(void) { return YES; });
 }
 
-// CHECK: attributes [[NUW]] = { noinline {{(norecurse )?}}nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { {{.*}}noinline {{(norecurse )?}}nounwind{{.*}} }

diff  --git a/clang/test/CodeGenObjCXX/lambda-expressions.mm b/clang/test/CodeGenObjCXX/lambda-expressions.mm
index 27e8f7814d00..001b091657e4 100644
--- a/clang/test/CodeGenObjCXX/lambda-expressions.mm
+++ b/clang/test/CodeGenObjCXX/lambda-expressions.mm
@@ -164,5 +164,5 @@ void test() {
 
 #endif
 
-// ARC: attributes [[NUW]] = { noinline nounwind{{.*}} }
-// MRC: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// ARC: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }
+// MRC: attributes [[NUW]] = { mustprogress noinline nounwind{{.*}} }

diff  --git a/clang/test/CodeGenOpenCL/convergent.cl b/clang/test/CodeGenOpenCL/convergent.cl
index 1905d7dd81aa..a06232721eb9 100644
--- a/clang/test/CodeGenOpenCL/convergent.cl
+++ b/clang/test/CodeGenOpenCL/convergent.cl
@@ -134,7 +134,7 @@ kernel void assume_convergent_asm()
   __asm__ volatile("s_barrier");
 }
 
-// CHECK: attributes #0 = { nofree noinline norecurse nounwind willreturn mustprogress "
+// CHECK: attributes #0 = { mustprogress nofree noinline norecurse nounwind willreturn "
 // CHECK: attributes #1 = { {{[^}]*}}convergent{{[^}]*}} }
 // CHECK: attributes #2 = { {{[^}]*}}convergent{{[^}]*}} }
 // CHECK: attributes #3 = { {{[^}]*}}convergent noduplicate{{[^}]*}} }

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
index 319f1201e8eb..31683b12d604 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
@@ -11,7 +11,7 @@ struct ST {
   struct RT Z;
 };
 
-// CHECK: Function Attrs: noinline nounwind optnone mustprogress
+// CHECK: Function Attrs: mustprogress noinline nounwind optnone
 // CHECK-LABEL: @_Z3fooP2ST(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[S_ADDR:%.*]] = alloca %struct.ST*, align 8

diff  --git a/llvm/include/llvm/IR/Attributes.td b/llvm/include/llvm/IR/Attributes.td
index b3ea4f0b873c..9f44f7960607 100644
--- a/llvm/include/llvm/IR/Attributes.td
+++ b/llvm/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/llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll b/llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
index 556d721d6b2c..7f1841f13f23 100644
--- a/llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
+++ b/llvm/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/llvm/test/CodeGen/AMDGPU/inline-attr.ll b/llvm/test/CodeGen/AMDGPU/inline-attr.ll
index 16e3e5c578fe..a65b9a52612a 100644
--- a/llvm/test/CodeGen/AMDGPU/inline-attr.ll
+++ b/llvm/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/llvm/test/Transforms/Attributor/willreturn.ll b/llvm/test/Transforms/Attributor/willreturn.ll
index d108ba30bc21..c155dab6e684 100644
--- a/llvm/test/Transforms/Attributor/willreturn.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/atomic.ll b/llvm/test/Transforms/FunctionAttrs/atomic.ll
index d8f801081b7b..da68d8d7f06c 100644
--- a/llvm/test/Transforms/FunctionAttrs/atomic.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll b/llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
index d8e2db15691a..24d05684668a 100644
--- a/llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll b/llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
index 41c19870ba77..306779762608 100644
--- a/llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/nofree.ll b/llvm/test/Transforms/FunctionAttrs/nofree.ll
index 16e8bc25a5c3..d58c8bd09a5a 100644
--- a/llvm/test/Transforms/FunctionAttrs/nofree.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/nosync.ll b/llvm/test/Transforms/FunctionAttrs/nosync.ll
index 6c3bc7b26d46..2842d24a929b 100644
--- a/llvm/test/Transforms/FunctionAttrs/nosync.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/nounwind.ll b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
index 02c1bb4fd153..f03bf0511039 100644
--- a/llvm/test/Transforms/FunctionAttrs/nounwind.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/optnone.ll b/llvm/test/Transforms/FunctionAttrs/optnone.ll
index 57b9b82291dd..6d8a1d58f148 100644
--- a/llvm/test/Transforms/FunctionAttrs/optnone.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll b/llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
index 1dbeffc927cd..d070763b2445 100644
--- a/llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/willreturn.ll b/llvm/test/Transforms/FunctionAttrs/willreturn.ll
index 35f48e7a344c..0465311926ac 100644
--- a/llvm/test/Transforms/FunctionAttrs/willreturn.ll
+++ b/llvm/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/llvm/test/Transforms/FunctionAttrs/writeonly.ll b/llvm/test/Transforms/FunctionAttrs/writeonly.ll
index 1aaae3a275f6..db9f49bc9e4c 100644
--- a/llvm/test/Transforms/FunctionAttrs/writeonly.ll
+++ b/llvm/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/llvm/test/Transforms/InferFunctionAttrs/annotate.ll b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
index 3b374d473a22..31656e2bb294 100644
--- a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+++ b/llvm/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/llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll b/llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
index 6b475103dade..9b90f59d3602 100644
--- a/llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
+++ b/llvm/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/llvm/test/Transforms/Inline/always-inline-attr.ll b/llvm/test/Transforms/Inline/always-inline-attr.ll
index eb51f2be72ff..d411b9625219 100644
--- a/llvm/test/Transforms/Inline/always-inline-attr.ll
+++ b/llvm/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/llvm/test/Transforms/LICM/strlen.ll b/llvm/test/Transforms/LICM/strlen.ll
index 4a45a06f82f7..d14a082d3c49 100644
--- a/llvm/test/Transforms/LICM/strlen.ll
+++ b/llvm/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*)
 
 


        


More information about the llvm-commits mailing list