<html>
    <head>
      <base href="https://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 - [X86] Using SSE4 instructions for roundl() cause test failure in Android."
   href="https://bugs.llvm.org/show_bug.cgi?id=45722">45722</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Using SSE4 instructions for roundl() cause test failure in Android.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>yabinc@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>With patch <a href="https://reviews.llvm.org/D73607">https://reviews.llvm.org/D73607</a> ([X86] Custom lower ISD::FROUND with
SSE4.1 to avoid a libcall), we have a problem to pass a test in Android.

The test is TEST(MATH_TEST, roundl) in
<a href="https://android.googlesource.com/platform/bionic/+/refs/heads/master/tests/math_test.cpp#1224">https://android.googlesource.com/platform/bionic/+/refs/heads/master/tests/math_test.cpp#1224</a>.

The problem is: with the LLVM patch, roundl(0.5L) is replace by SSE
instructions when building for 32-bit tests on x86_64. And SSE instructions are
affected by round mode set by fesetround(FE_TOWARDZERO), and makes roundl(0.5L)
=> 0.

I am not sure where we should fix this (Android bionic libc or llvm). So create
this bug to ask for help.</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>