[llvm-bugs] [Bug 34442] New: polly crashes with "opt -mem2reg -ipsccp -gvn -polly-dependences" while running pass 'Polly - Create polyhedral description of Scops'

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 3 12:42:43 PDT 2017


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

            Bug ID: 34442
           Summary: polly crashes with "opt -mem2reg -ipsccp -gvn
                    -polly-dependences" while running pass 'Polly - Create
                    polyhedral description of Scops'
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          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
fc6ac77722c6bdc2508229af6f8aebfebe02f0fa) (http://llvm.org/git/llvm.git
1ee1fb604621025bd2b1a681a09ab54ff69623d1)
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 -mem2reg -ipsccp -gvn -polly-dependences -o small-opt.bc small.bc
optpolly:
/home/su/software/tmp/polly/llvm/tools/polly/lib/Analysis/ScopInfo.cpp:3041:
bool polly::Scop::addLoopBoundsToHeaderDomain(llvm::Loop*, llvm::LoopInfo&,
llvm::DenseMap<llvm::BasicBlock*, isl::noexceptions::set>&): Assertion `BI &&
"Only branch instructions allowed in loop latches"' failed.
#0 0x00000000038af81a (optpolly+0x38af81a)
#1 0x00000000038af8ab (optpolly+0x38af8ab)
#2 0x00000000038adcc0 (optpolly+0x38adcc0)
#3 0x00000000038af19d (optpolly+0x38af19d)
#4 0x00007f8d9bf99330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007f8d9ad81c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007f8d9ad85028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007f8d9ad7abf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007f8d9ad7aca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000003c359c2 (optpolly+0x3c359c2)
#10 0x0000000003c3555b (optpolly+0x3c3555b)
#11 0x0000000003c33395 (optpolly+0x3c33395)
#12 0x0000000003c7386d (optpolly+0x3c7386d)
#13 0x0000000003c7428c (optpolly+0x3c7428c)
#14 0x0000000003c415ca (optpolly+0x3c415ca)
#15 0x0000000002ac5137 (optpolly+0x2ac5137)
#16 0x0000000003193bcc (optpolly+0x3193bcc)
#17 0x0000000003193d5f (optpolly+0x3193d5f)
#18 0x00000000031940fa (optpolly+0x31940fa)
#19 0x0000000003194851 (optpolly+0x3194851)
#20 0x0000000003194a91 (optpolly+0x3194a91)
#21 0x00000000017fe118 (optpolly+0x17fe118)
#22 0x00007f8d9ad6cf45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#23 0x00000000017d7a29 (optpolly+0x17d7a29)
Stack dump:
0.      Program arguments: optpolly -mem2reg -ipsccp -gvn -polly-dependences -o
small-opt.bc small.bc 
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Region Pass Manager' on function '@foo'
3.      Running pass 'Polly - Create polyhedral description of Scops' on basic
block '%L'
Aborted (core dumped)
$ 


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


int a, b, c;

void foo ()
{
  int e;
L:
  while (a)
    {
      int g;
      while (e) 
        {
          if (c)
            goto L;
          return; 
        }
      b = c;
    }
}

int main ()
{
  foo ();
  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/20170903/a28c5e78/attachment.html>


More information about the llvm-bugs mailing list