<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 --- - -mavx512bw produces wrong code for greater/less than"
href="https://llvm.org/bugs/show_bug.cgi?id=31731">31731</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-mavx512bw produces wrong code for greater/less than
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@marehr.dialup.fu-berlin.de
</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>Created <span class=""><a href="attachment.cgi?id=17886" name="attach_17886" title="simd_bug.cpp">attachment 17886</a> <a href="attachment.cgi?id=17886&action=edit" title="simd_bug.cpp">[details]</a></span>
simd_bug.cpp
Hi,
the attached source code works fine with:
```
clang++-3.9 -g -std=c++14 -O3 -mavx512f -mavx512cd -o avx512_knl
sde -skx -- ./avx512_knl
```
outputs
```
8: 21 < or > 24 => -1 0
9: 24 < or > 23 => 0 -1
```
```
but with
```
clang++-3.9 -g -std=c++14 -O3 -mavx512f -mavx512cd -mavx512bw -o avx512
sde -skx -- ./avx512
```
outputs
```
8: 21 < or > 24 => -1 0
9: 24 < or > 23 => -1 0
```
which is not correct. The error could be due to sde, that it simulates the
instructions wrong, or the code generation of clang is wrong.
Versions:
```
clang-3.9 --version
clang version 3.9.1-svn288847-1~exp1 (branches/release_39)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
sde --version
Intel(R) Software Development Emulator. Version: 7.49.0 external
Copyright (C) 2008-2016, Intel Corporation. All rights reserved
```
Thank you for your 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>