[llvm-bugs] [Bug 32329] New: Silent failure in X86 DAG->DAG Instruction Selection with -march=skx -O3

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 17 09:56:12 PDT 2017


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

            Bug ID: 32329
           Summary: Silent failure in X86 DAG->DAG Instruction Selection
                    with -march=skx -O3
           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 18121
  --> https://bugs.llvm.org/attachment.cgi?id=18121&action=edit
Reproducer.

Clang silently fails in X86 DAG->DAG Instruction Selection with -march=skx -O3
options.

Reproducer:
extern const unsigned short var_2;
extern const unsigned long long int var_24;
extern const signed char var_27;
extern unsigned long long int var_50;
extern signed char var_205;
extern signed char var_218;
extern unsigned long long int var_310;

struct AA {
    unsigned long long int memb : 22;
};

extern AA obj;

void foo() {
  var_50 = long (9) << (obj.memb + obj.memb - var_27 - var_2) * (var_24 +
var_310 * var_27) - 9783838718932435343;
  var_205 = obj.memb + obj.memb - var_27 - var_2 >= obj.memb;
  var_218 = (obj.memb + obj.memb - var_27) * var_27;
}

Error:
>$ clang++ -w -O3 -march=skx -c repr.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'repr.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z3foov'
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)

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/20170317/e694ecff/attachment.html>


More information about the llvm-bugs mailing list