[llvm-bugs] [Bug 32311] New: Incorrect result with -O1 -march=skx

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 16 06:34:38 PDT 2017


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

            Bug ID: 32311
           Summary: Incorrect result with -O1 -march=skx
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: Vsevolod.Livinskij at frtk.ru
                CC: llvm-bugs at lists.llvm.org

Created attachment 18112
  --> https://bugs.llvm.org/attachment.cgi?id=18112&action=edit
Reproducer.

Clang produces wrong code with -O1/2/3 -march=skx options. 
According to LLVM bisect, it is a fault of X86 DAG->DAG Instruction Selection
(as far as I understood its output).
BISECT: running pass (62) X86 DAG->DAG Instruction Selection on function
BISECT: NOT running pass (63) Local Dynamic TLS Access Clean-up on function

Unfortunately, I failed to reduce test case further.

Error:
>$ clang++ -w -O0 -march=skx *.cpp 
>$ sde -skx -- ./a.out
1
>$ clang++ -w -O1 -march=skx *.cpp 
>$ sde -skx -- ./a.out 
-1

LLVM version:
clang version 5.0.0 (trunk 297835)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vsevolod/workspace/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

-- 
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/20170316/cecd4b2b/attachment-0001.html>


More information about the llvm-bugs mailing list