[llvm] [TLI] Support inferring function attributes for sincos[f|l] (PR #108554)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 23:23:17 PDT 2024


================
@@ -1270,6 +1270,18 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
     Changed |= setOnlyWritesMemory(F);
     Changed |= setWillReturn(F);
     break;
+  case LibFunc_sincos:
+  case LibFunc_sincosf:
+  case LibFunc_sincosl:
+    Changed |= setDoesNotThrow(F);
+    Changed |= setDoesNotFreeMemory(F);
+    Changed |= setOnlyWritesMemory(F);
+    Changed |= setOnlyWritesMemory(F, 1);
+    Changed |= setOnlyWritesMemory(F, 2);
+    Changed |= setDoesNotCapture(F, 1);
+    Changed |= setDoesNotCapture(F, 2);
+    Changed |= setWillReturn(F);
----------------
arsenm wrote:

Yes, there's probably something to do here but it's beyond the scope of this patch 

https://github.com/llvm/llvm-project/pull/108554


More information about the llvm-commits mailing list