[llvm-bugs] [Bug 41107] New: opt crashes with "opt -loop-idiom -simplifycfg -instcombine -jump-threading -gvn -inline -ipsccp -memdep -early-cse-memssa"

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 16 23:40:07 PDT 2019


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

            Bug ID: 41107
           Summary: opt crashes with "opt -loop-idiom -simplifycfg
                    -instcombine -jump-threading -gvn -inline -ipsccp
                    -memdep -early-cse-memssa"
           Product: libraries
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: cszide at 163.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21617
  --> https://bugs.llvm.org/attachment.cgi?id=21617&action=edit
.bc file of the source code

$clang -v
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/jack-zhou/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.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.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt -version
LLVM (http://llvm.org/):
  LLVM version 7.0.1
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake

$clang -O3 -c -emit-llvm  -mllvm -disable-llvm-optzns small.c  -o small.bc

$opt -loop-idiom -simplifycfg -instcombine -jump-threading -gvn -inline -ipsccp
-memdep -early-cse-memssa small.bc -o small-opt.bc
Stack dump:
0.      Program arguments: opt -loop-idiom -simplifycfg -instcombine
-jump-threading -gvn -inline -ipsccp -memdep -early-cse-memssa small.bc -o
small-opt.bc 
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Early CSE w/ MemorySSA' on function '@u'
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000001bf8154 (opt+0x1bf8154)
#1 0x0000000001bf617e (opt+0x1bf617e)
#2 0x0000000001bf8312 (opt+0x1bf8312)
#3 0x00007fac030b4890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00000000012549ac (opt+0x12549ac)
#5 0x00000000012a5b1d (opt+0x12a5b1d)
#6 0x000000000139e7b1 (opt+0x139e7b1)
#7 0x0000000001218f1c (opt+0x1218f1c)
#8 0x000000000121c959 (opt+0x121c959)
#9 0x000000000121969e (opt+0x121969e)
#10 0x0000000001218d48 (opt+0x1218d48)
#11 0x0000000001204bef (opt+0x1204bef)
#12 0x0000000000b710b2 (opt+0xb710b2)
#13 0x00000000012fd8df (opt+0x12fd8df)
#14 0x00000000012fc26b (opt+0x12fc26b)
#15 0x00000000012fd017 (opt+0x12fd017)
#16 0x00000000019fdd27 (opt+0x19fdd27)
#17 0x0000000001a02a5e (opt+0x1a02a5e)
#18 0x0000000001757ff1 (opt+0x1757ff1)
#19 0x0000000001758223 (opt+0x1758223)
#20 0x000000000175876e (opt+0x175876e)
#21 0x00000000007afbf5 (opt+0x7afbf5)
#22 0x00007fac01b41b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x000000000079c5ba (opt+0x79c5ba)
Segmentation fault (core dumped)

small.c------------------------------------------------
t, a;
static unsigned b(long long, long long, int, signed char, unsigned short);
u() {
  const c[] = {};
  (d(b(0, 2, 2, c, c)));
}
unsigned b(long long e, long long p, f, signed char g, unsigned short h) {
  int i = 0;
  int j;
  int *k;
q : {
    signed char s;
    unsigned *l_t = 0;
    unsigned *l = 0;
    if (g) {
      long long r;
      for (; j; j++)
        ;
      if (t)
        goto q;
      if (h) {
        signed char m = a;
        signed char n[][9] = {m, 0, m, m, 0, m, m, m, m, 0, m, m, m, m, m,
                            0, m, 0, m, m, m, m, m, m, m, m, m, m, m, m,
                            m, m, m, m, m, m, m, 0, m, m, 0, m, m, 0, m,
                            m, 0, m, m, m, m, m, m, 0, m, 0, m, m, m, 0,
                            m, m, 0, m, 0, m, m, m, m, m, m, m, m, m};
        if (f)
          i |= (o((((*k = s && e)))));
      }
    }
    *l = l_t;
  }
}

-- 
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/20190317/af97daa7/attachment.html>


More information about the llvm-bugs mailing list