<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 - vcvtq_u32_f32 gives wrong results for out of range values on ARM"
   href="https://bugs.llvm.org/show_bug.cgi?id=47510">47510</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>vcvtq_u32_f32 gives wrong results for out of range values on ARM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jmuizelaar@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>int f() {
    float32x4_t k ={ 10e33, 0, 0, 0} ;
    return vgetq_lane_u32(vcvtq_u32_f32 (k), 0);
}

gives

define i32 @_Z1fv() local_unnamed_addr #0 {
  ret i32 undef
}

Instead, it should give INT_MAX.

on AARCH64 this is correctly compiled to:

define dso_local i32 @_Z1fv() local_unnamed_addr #0 {
  %1 = tail call <4 x i32> @llvm.aarch64.neon.fcvtzu.v4i32.v4f32(<4 x float>
<float 0x46FED09BE0000000, float 0.000000e+00, float 0.000000e+00, float
0.000000e+00>) #2
  %2 = extractelement <4 x i32> %1, i32 0
  ret i32 %2
}</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>