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/unittests/Analysis/TargetLibraryInfoTest.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/unittests/Analysis/TargetLibraryInfoTest.cpp')
-rw-r--r-- | llvm/unittests/Analysis/TargetLibraryInfoTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp index 98f8989..982d00c 100644 --- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp +++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp @@ -249,6 +249,9 @@ TEST_F(TargetLibraryInfoTest, ValidProto) { "declare %struct* @getpwnam(i8*)\n" "declare i8* @gets(i8*)\n" "declare i32 @gettimeofday(%struct*, i8*)\n" + "declare double @hypot(double, double)\n" + "declare float @hypotf(float, float)\n" + "declare x86_fp80 @hypotl(x86_fp80, x86_fp80)\n" "declare i32 @_Z7isasciii(i32)\n" "declare i32 @_Z7isdigiti(i32)\n" "declare i64 @labs(i64)\n" |