[llvm] [InstCombine] Add support for Instruction combining of hyperbolic functions (PR #173730)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 29 08:25:20 PST 2025


================
@@ -3074,6 +3074,33 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
     }
     break;
   }
+  case Intrinsic::cosh: {
----------------
dtcxzyw wrote:

Will we have more specific optimization about hyperbolic functions? If not, I'd like to merge the paths for odd/even functions:
```
case cos:
case cosh:
    // path for even functions
case sin:
case sinh:
case tan:
case tanh:
   // path for odd functions
```

https://github.com/llvm/llvm-project/pull/173730


More information about the llvm-commits mailing list