https://github.com/arsenm updated 
https://github.com/llvm/llvm-project/pull/167080

>From 238ad7def6d2051e6e80a17f0018143a5b91552b Mon Sep 17 00:00:00 2001
From: Matt Arsenault <[email protected]>
Date: Fri, 7 Nov 2025 17:20:09 -0800
Subject: [PATCH] RuntimeLibcalls: Add mustprogress to common function
 attributes

---
 llvm/lib/IR/RuntimeLibcalls.cpp                               | 4 ++--
 llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll     | 2 +-
 .../Util/DeclareRuntimeLibcalls/merge_attributes.ll           | 2 +-
 .../Transforms/Util/DeclareRuntimeLibcalls/sincos_stret.ll    | 4 ++--
 llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll     | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index c8d9e7801ae6b..66a1396bc2027 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -134,8 +134,8 @@ RuntimeLibcallsInfo::getFunctionTy(LLVMContext &Ctx, const 
Triple &TT,
                                    const DataLayout &DL,
                                    RTLIB::LibcallImpl LibcallImpl) const {
   static constexpr Attribute::AttrKind CommonFnAttrs[] = {
-      Attribute::NoCallback, Attribute::NoFree, Attribute::NoSync,
-      Attribute::NoUnwind, Attribute::WillReturn};
+      Attribute::MustProgress, Attribute::NoCallback, Attribute::NoFree,
+      Attribute::NoSync,       Attribute::NoUnwind,   Attribute::WillReturn};
   static constexpr Attribute::AttrKind CommonPtrArgAttrs[] = {
       Attribute::NoAlias, Attribute::WriteOnly, Attribute::NonNull};
 
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll 
b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
index e79e89c95c14a..c40cdf803474e 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
@@ -26,4 +26,4 @@
 ; CHECK: declare aarch64_vector_pcs void @armpl_vsincosq_f64(<2 x double>, ptr 
noalias nonnull writeonly align 16, ptr noalias nonnull writeonly align 16) 
[[ATTRS]]
 
 
-; CHECK: attributes [[ATTRS]] = { nocallback nofree nosync nounwind willreturn 
memory(argmem: write) }
+; CHECK: attributes [[ATTRS]] = { mustprogress nocallback nofree nosync 
nounwind willreturn memory(argmem: write) }
diff --git 
a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/merge_attributes.ll 
b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/merge_attributes.ll
index ffbf11d4106dc..af876a7988d4e 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/merge_attributes.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/merge_attributes.ll
@@ -8,4 +8,4 @@ define noundef nofpclass(nan) float @sqrtf(float %x) "foo" {
 ; FIXME: Individual fields of nofpclass not merged
 ; CHECK: define noundef nofpclass(ninf nsub nnorm) float @sqrtf(float %x) 
[[SQRT_ATTR:#[0-9]+]] {
 
-; CHECK: attributes [[SQRT_ATTR]] = { nocallback nofree nosync nounwind 
willreturn memory(errnomem: write) "foo" }
+; CHECK: attributes [[SQRT_ATTR]] = { mustprogress nocallback nofree nosync 
nounwind willreturn memory(errnomem: write) "foo" }
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sincos_stret.ll 
b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sincos_stret.ll
index 57cb016bcb7f3..c7da97d410a9f 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sincos_stret.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sincos_stret.ll
@@ -16,8 +16,8 @@
 ; SRET: declare void @__sincos_stret(ptr sret({ double, double }) align 4, 
double) [[SINCOS_ATTRS:#[0-9]+]]
 ; SRET: declare void @__sincosf_stret(ptr sret({ float, float }) align 4, 
float) [[SINCOS_ATTRS:#[0-9]+]]
 
-; CHECK: attributes [[SINCOS_ATTRS]] = { nocallback nofree nosync nounwind 
willreturn memory(errnomem: write) }
-; SRET: attributes [[SINCOS_ATTRS]] = { nocallback nofree nosync nounwind 
willreturn memory(argmem: write, errnomem: write) }
+; CHECK: attributes [[SINCOS_ATTRS]] = { mustprogress nocallback nofree nosync 
nounwind willreturn memory(errnomem: write) }
+; SRET: attributes [[SINCOS_ATTRS]] = { mustprogress nocallback nofree nosync 
nounwind willreturn memory(argmem: write, errnomem: write) }
 
 ; NONE-NOT: __sincos_stret
 ; NONE-NOT: __sincosf_stret
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll 
b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll
index ef2481111087f..e0d8489f7b94e 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll
@@ -25,4 +25,4 @@
 
 ; CHECK: declare void @_ZGVsNxvl8l8_sincospi(<vscale x 2 x double>, ptr 
noalias nonnull writeonly align 16, ptr noalias nonnull writeonly align 16) 
[[ATTRS]]
 
-; CHECK: attributes [[ATTRS]] = { nocallback nofree nosync nounwind willreturn 
memory(argmem: write) }
+; CHECK: attributes [[ATTRS]] = { mustprogress nocallback nofree nosync 
nounwind willreturn memory(argmem: write) }

_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to