[llvm] [InstCombine] Optimize `sinh` and `cosh` divisions (PR #81433)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 21:46:08 PST 2024
================
@@ -0,0 +1,114 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+
+define double @fdiv_cosh_sinh(double %a) {
+; CHECK-LABEL: @fdiv_cosh_sinh(
+; CHECK-NEXT: [[TMP1:%.*]] = call double @cosh(double [[A:%.*]])
+; CHECK-NEXT: [[TMP2:%.*]] = call double @sinh(double [[A]])
+; CHECK-NEXT: [[DIV:%.*]] = fdiv double [[TMP1]], [[TMP2]]
+; CHECK-NEXT: ret double [[DIV]]
+;
+ %1 = call double @cosh(double %a)
----------------
arsenm wrote:
Use named values
https://github.com/llvm/llvm-project/pull/81433
More information about the llvm-commits
mailing list