[llvm-bugs] [Bug 31731] New: -mavx512bw produces wrong code for greater/less than

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 23 23:43:55 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31731

            Bug ID: 31731
           Summary: -mavx512bw produces wrong code for greater/less than
           Product: clang
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm at marehr.dialup.fu-berlin.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17886
  --> https://llvm.org/bugs/attachment.cgi?id=17886&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170124/6e191f24/attachment.html>


More information about the llvm-bugs mailing list