[llvm] [TLI] Support inferring function attributes for sincos[f|l] (PR #108554)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 10:23:48 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. not sure if -fno-math-errno considers this case
https://github.com/llvm/llvm-project/pull/108554
More information about the llvm-commits
mailing list