[llvm-bugs] [Bug 34479] New: opt crashes with "opt -polly-canonicalize -jump-threading -newgvn": Assertion `BeforeCC->isEquivalentTo(AfterCC) && "Value number changed after main loop completed!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 5 12:59:47 PDT 2017


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

            Bug ID: 34479
           Summary: opt crashes with "opt -polly-canonicalize
                    -jump-threading -newgvn": Assertion
                    `BeforeCC->isEquivalentTo(AfterCC) && "Value number
                    changed after main loop completed!"' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: su at cs.ucdavis.edu
                CC: llvm-bugs at lists.llvm.org

$ clangpolly -v
clang version 6.0.0 (http://llvm.org/git/clang.git
5a2b037a53684751a712b11898a0cc69815f2ba7) (http://llvm.org/git/llvm.git
76db91a4f033defd405dfb4d14ba6c0c7e205ce0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.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.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$ 
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -polly-canonicalize -jump-threading -newgvn -o small.c-opt.bc
small.c.bc 
optpolly:
/home/su/software/tmp/polly/llvm/lib/Transforms/Scalar/NewGVN.cpp:3139: void
{anonymous}::NewGVN::verifyIterationSettled(llvm::Function&): Assertion
`BeforeCC->isEquivalentTo(AfterCC) && "Value number changed after main loop
completed!"' failed.
#0 0x00000000038ad6f4 (optpolly+0x38ad6f4)
#1 0x00000000038ad785 (optpolly+0x38ad785)
#2 0x00000000038abb9a (optpolly+0x38abb9a)
#3 0x00000000038ad077 (optpolly+0x38ad077)
#4 0x00007f882b83d330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007f882a625c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007f882a629028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007f882a61ebf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007f882a61eca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x00000000036f06c4 (optpolly+0x36f06c4)
#10 0x00000000036f1ba0 (optpolly+0x36f1ba0)
#11 0x00000000036f5310 (optpolly+0x36f5310)
#12 0x0000000003190d6a (optpolly+0x3190d6a)
#13 0x0000000003190efd (optpolly+0x3190efd)
#14 0x0000000003191298 (optpolly+0x3191298)
#15 0x00000000031919ef (optpolly+0x31919ef)
#16 0x0000000003191c2f (optpolly+0x3191c2f)
#17 0x00000000017fcbe8 (optpolly+0x17fcbe8)
#18 0x00007f882a610f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#19 0x00000000017d64f9 (optpolly+0x17d64f9)
Stack dump:
0.      Program arguments: optpolly -polly-canonicalize -jump-threading -newgvn
-o small.c-opt.bc small.c.bc 
1.      Running pass 'Function Pass Manager' on module 'small.c.bc'.
2.      Running pass 'Global Value Numbering' on function '@f'
Aborted (core dumped)
$ 


---------------------------------



void a (int b) {}

short c, d[9];
int e;

void f ()
{
  int g = 7;
  for (; g >= 0; g--)
    while (c)
      {
        if (e)
          continue;
        a (d[c + g + 1]);
        if (g)
          break;
      }
}

int main ()
{
  f ();
  return 0; 
}

-- 
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/20170905/f308e91b/attachment.html>


More information about the llvm-bugs mailing list