diff options
author | Kenji Mouri / 毛利 研二 <Kenji.Mouri@outlook.com> | 2024-10-31 22:50:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 07:50:29 -0700 |
commit | 7e877fc0ac3492a195f2ca587837db79e3729fcc (patch) | |
tree | fde6ae44e29af2c11f104b5ffb5b4aa60b0281a9 /llvm/lib/Transforms/Utils/BuildLibCalls.cpp | |
parent | 880b3b26c9d7b479f678df665dd2cecac988a7f3 (diff) | |
download | llvm-7e877fc0ac3492a195f2ca587837db79e3729fcc.zip llvm-7e877fc0ac3492a195f2ca587837db79e3729fcc.tar.gz llvm-7e877fc0ac3492a195f2ca587837db79e3729fcc.tar.bz2 |
[Reland][TLI] Add support for hypot libcall. (#114343)
This patch adds basic support for `hypot`. Constant folding support will
be submitted in a subsequent patch.
Related issue: https://github.com/llvm/llvm-project/issues/113711
Note: It's my first time contributing to the LLVM with encouragement
from one of my friends, @fawdlstty. I learned a lot from
https://github.com/llvm/llvm-project/pull/99611, and thanks for that.
Note: I had created the same PR and merged
(https://github.com/llvm/llvm-project/pull/113724), but reverted caused
by the merging issue. (The CI issue happened in 3 A.M. at my timezone.
So, I need to fall asleep again after I replied about why issue
happened.) So, I rebased to the latest main branch and recreate the PR
and hope I won't have the third time to create the same PR.
I hope @arsenm can help me review the code again. I’m sorry for that.
Kenji Mouri
Diffstat (limited to 'llvm/lib/Transforms/Utils/BuildLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BuildLibCalls.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp index 5fd4fd7..e039457 100644 --- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp @@ -1215,6 +1215,9 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, case LibFunc_fmod: case LibFunc_fmodf: case LibFunc_fmodl: + case LibFunc_hypot: + case LibFunc_hypotf: + case LibFunc_hypotl: case LibFunc_isascii: case LibFunc_isdigit: case LibFunc_labs: |