aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-07-19 16:35:59 +0800
committerGitHub <noreply@github.com>2024-07-19 16:35:59 +0800
commite8fbefe15b101d7d30366cbe2ac068449923f5e2 (patch)
tree906073c13e300befe948e6a43bd89fad8babe223 /llvm/lib/Transforms/Utils/BuildLibCalls.cpp
parent270f5e42b8daab586ffcd2b46ff41486199f6626 (diff)
downloadllvm-e8fbefe15b101d7d30366cbe2ac068449923f5e2.zip
llvm-e8fbefe15b101d7d30366cbe2ac068449923f5e2.tar.gz
llvm-e8fbefe15b101d7d30366cbe2ac068449923f5e2.tar.bz2
[TLI] Add basic support for remquo libcall (#99611)
This patch adds basic support for `remquo`. Constant folding support will be submitted in a subsequent patch. Related issue: https://github.com/llvm/llvm-project/issues/99497
Diffstat (limited to 'llvm/lib/Transforms/Utils/BuildLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BuildLibCalls.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index 1ced365..0c45bd8 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -1098,6 +1098,11 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
case LibFunc_ldexpl:
Changed |= setWillReturn(F);
break;
+ case LibFunc_remquo:
+ case LibFunc_remquof:
+ case LibFunc_remquol:
+ Changed |= setDoesNotCapture(F, 2);
+ [[fallthrough]];
case LibFunc_abs:
case LibFunc_acos:
case LibFunc_acosf: