[llvm] Precommit Tests (PR #173730)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 27 08:46:40 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kshitij Paranjape (kshitijvp)
<details>
<summary>Changes</summary>
Fixes llvm/llvm-project#<!-- -->173706
---
Full diff: https://github.com/llvm/llvm-project/pull/173730.diff
1 Files Affected:
- (added) llvm/test/Transforms/InstCombine/hyperbolic-functions.ll (+84)
``````````diff
diff --git a/llvm/test/Transforms/InstCombine/hyperbolic-functions.ll b/llvm/test/Transforms/InstCombine/hyperbolic-functions.ll
new file mode 100644
index 0000000000000..0d5631152057f
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/hyperbolic-functions.ll
@@ -0,0 +1,84 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define double @src_cosh(double noundef %x) {
+; CHECK-LABEL: @src_cosh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[FNEG:%.*]] = fneg double [[X:%.*]]
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.cosh.f64(double [[FNEG]])
+; CHECK-NEXT: ret double [[TMP0]]
+;
+entry:
+ %fneg = fneg double %x
+ %1 = tail call double @llvm.cosh.f64(double %fneg)
+ ret double %1
+}
+
+define double @tgt_cosh(double noundef %x) {
+; CHECK-LABEL: @tgt_cosh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.cosh.f64(double [[X:%.*]])
+; CHECK-NEXT: ret double [[TMP0]]
+;
+entry:
+ %1 = tail call double @llvm.cosh.f64(double %x)
+ ret double %1
+}
+
+declare double @llvm.cosh.f64(double)
+
+define double @src_tanh(double noundef %x) {
+; CHECK-LABEL: @src_tanh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[FNEG:%.*]] = fneg double [[X:%.*]]
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.tanh.f64(double [[FNEG]])
+; CHECK-NEXT: [[FNEG1:%.*]] = fneg double [[TMP0]]
+; CHECK-NEXT: ret double [[FNEG1]]
+;
+entry:
+ %fneg = fneg double %x
+ %0 = tail call double @llvm.tanh.f64(double %fneg)
+ %fneg1 = fneg double %0
+ ret double %fneg1
+}
+
+define double @tgt_tanh(double noundef %x) {
+; CHECK-LABEL: @tgt_tanh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.tanh.f64(double [[X:%.*]])
+; CHECK-NEXT: ret double [[TMP0]]
+;
+entry:
+ %0 = tail call double @llvm.tanh.f64(double %x)
+ ret double %0
+}
+
+declare double @llvm.tanh.f64(double)
+
+define double @src_sinh(double noundef %x) {
+; CHECK-LABEL: @src_sinh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[FNEG:%.*]] = fneg double [[X:%.*]]
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.sinh.f64(double [[FNEG]])
+; CHECK-NEXT: [[FNEG1:%.*]] = fneg double [[TMP0]]
+; CHECK-NEXT: ret double [[FNEG1]]
+;
+entry:
+ %fneg = fneg double %x
+ %0 = tail call double @llvm.sinh.f64(double %fneg)
+ %fneg1 = fneg double %0
+ ret double %fneg1
+}
+
+declare double @llvm.sinh.f64(double)
+
+define double @tgt_sinh(double noundef %x) {
+; CHECK-LABEL: @tgt_sinh(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.sinh.f64(double [[X:%.*]])
+; CHECK-NEXT: ret double [[TMP0]]
+;
+entry:
+ %0 = tail call double @llvm.sinh.f64(double %x)
+ ret double %0
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/173730
More information about the llvm-commits
mailing list