<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </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 - [test][builtins] __divsc3 (and more) tests fail depending on -march"
   href="http://bugs.llvm.org/show_bug.cgi?id=31964">31964</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[test][builtins] __divsc3 (and more) tests fail depending on -march
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mgorny@gentoo.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I attempted to address this in D28862 [1] but I don't really have the time atm
to figure out the best solution. Long story short, some tests may fail randomly
depending on -march and a few more parameters due to inexact results.

Citing the example from D28862:

<span class="quote">> For example, the value of (0.000001+j0.000001) / (-0.500000-j2.000000))
> computed the canonical way without specific machine flags is:</span >
>
<span class="quote">> z = -0x1.3bce70p-21 + j0x1.7af7bcp-22</span >
>
<span class="quote">> However, if -march=i386 -mfpmath=387 is used, it becomes:</span >
>
<span class="quote">> z = -0x1.3bce72p-21 + j0x1.7af7bcp-22</span >

I don't really know if we should allow inexact result here (and how inexact
exactly) or if the generated code should be considered buggy.

[1]:<a href="https://reviews.llvm.org/D28862">https://reviews.llvm.org/D28862</a></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>