<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - @llvm.maxnum.* does not handle signaling NaNs the same way as IEEE 754-2008"
   href="https://llvm.org/bugs/show_bug.cgi?id=27363">27363</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>@llvm.maxnum.* does not handle signaling NaNs the same way as IEEE 754-2008
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>stoklund@2pi.dk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The @llvm.maxnum.* intrinsic is documented like this:

<span class="quote">> Follows the IEEE-754 semantics for maxNum, which also match for libm’s fmax.</span >
>
<span class="quote">> If either operand is a NaN, returns the other non-NaN operand.
> Returns NaN only if both operands are NaN.</span >

If one operand is a signaling NaN, this behavior doesn't match IEEE 754-2008:

    @llvm.maxnum.f64(1.0, qNaN) -> 1.0
    @llvm.maxnum.f64(1.0, sNaN) -> 1.0

IEEE 754-2008:

    maxNum(1.0, qNaN) -> 1.0
    maxNum(1.0, sNaN) -> qNaN

I wonder if this changed in the 2008 revision?

The Aarch64 backend translates an fmax() library call to an fmaxnm instruction
which has the 754-2008 semantics for signaling NaNs.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>