<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/79817>79817</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Simplify cosh(x) / sinh(x) -> 1/tanh(x) with fast math
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          felixkellenbenz
      </td>
    </tr>
</table>

<pre>
    When using `sin(x)` and `cos(x)` the optimization for `cos(x) / sin(x) -> 1/tan(x)` is already implemented. This is not the case for the hyperbolic functions, maybe it would be good to also implement this behavior for `sinh(x)` and `cos(x)`. 
However this is not how `gcc` behaves, `gcc` calculates it like `cos(x) / sin(x)`.
If this behavior is not desired I can close the issue.

See here:
https://godbolt.org/z/vrMTP3h9x
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEkkFvnD4QxT-NuYyyMgaWcODw_zdFzaFSpUTq2dgDdmPslcfsZvPpK5NNN42q9gLyY-a9H-ORRHb2iD1r_mfNXSHXZELsJ3T2-QmdQz-ifynGoM_9d4MeVrJ-BrbnZD0Tt89MdGzPQXqdRRXonZgMQjgku9gXmWzwMIX4exUwMcDVCW5Y9RlKJoYk37tbAukiSn0GuxwcLugT6h08Gkv5ow9pC1OScAvJB3M-YByDswqm1asMQEx8gkWeRwSb4BRWp2FEmEPQkAJIR-EaACm7j2jk0Yb4xk7Wm3_89w4Yv2P8vy_hhEeMrz4XShNOuX5WKndv5rhRXUUlnVqdTEgZ0tkn_OvMcuBr3v30AfmSqZFsRA33oKQH5QLhNiBLtOKl9_X5gAgGI7LqIpiUDpRPYmBimIMeg0u7EGcmhhcmhmP8-vitMt1zoftKd1UnC-zLlu-bSpRlW5h-HEUnZFvrRpW6rWucFGopuMCuU7JtCtsLLmpeiq4Uddm0O9HeykmJhlf7kk-Ks5rjIq3bOXdccnaxgfdtd1u2hZMjOnpb39jnoptxnYnV3FlKdG1LNjnsH_IF2-kMKpD5MFLzpz38JZ5sMjBJSrDIZIo1uv7DfGwy67hTYWFiyLGX180hhh-oEhPDhk5MDBv9zwAAAP__YfcYBw">