<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 --- - Use AVX-512 packed instructions for scalar FP<->64-bit integer conversions on x86"
href="https://llvm.org/bugs/show_bug.cgi?id=31630">31630</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Use AVX-512 packed instructions for scalar FP<->64-bit integer conversions on x86
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.l.kreitzer@intel.com
</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 scalar FP<->64-bit integer conversions are only available for 64-bit
targets, but the packed AVX-512 versions can be used in lieu of the x87
sequences we are currently using in all the following cases. When converting in
the fp->int direction, we should take care to blend in safe values for the
upper elements, zero being the obvious choice.
Compile as "clang -m32 -O2 -S -march=skx" to reproduce.
#include <stdint.h>
uint64_t f1(double x) {
return x;
}
double f2(uint64_t x) {
return x;
}
int64_t f3(double x) {
return x;
}
double f4(int64_t x) {
return x;
}
uint64_t f5(float x) {
return x;
}
float f6(uint64_t x) {
return x;
}
int64_t f7(float x) {
return x;
}
float f8(int64_t x) {
return x;
}</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>