<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 - [AArch64] incorrect results from vcvt* functions with negative inputs when optimization is enabled"
href="https://bugs.llvm.org/show_bug.cgi?id=46844">46844</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] incorrect results from vcvt* functions with negative inputs when optimization is enabled
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>clang@evan.coeusgroup.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Several vcvt* functions return garbage instead of 0 when the input are < 0.
Specifically:
* vcvts_u32_f32
* vcvtd_u64_f64
* vcvt_u32_f32
* vcvt_u64_f64
* vcvtq_u32_f32
* vcvtq_u64_f64
Here is a simple test case, compile without optimizations and the result is 0
(which is correct), but with -O1 or higher it is incorrect.
#include <arm_neon.h>
#include <stdio.h>
#include <inttypes.h>
uint32_t foo(float a) {
return vgetq_lane_u32(vcvtq_u32_f32(vdupq_n_f32(a)), 0);
}
int main(void) {
printf("%" PRIu32 "\n", foo(-3.14));
return 0;
}</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>