[llvm-bugs] [Bug 34457] New: polly crashes with "opt -simplifycfg -newgvn -instcombine -polly-mse -polly-optree" while running pass 'Polly - Forward operand tree'

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 4 08:24:27 PDT 2017


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

            Bug ID: 34457
           Summary: polly crashes with "opt -simplifycfg -newgvn
                    -instcombine -polly-mse -polly-optree" while running
                    pass 'Polly - Forward operand tree'
           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
9b9a71803226ccc3c9310312967117875b9ff77e) (http://llvm.org/git/llvm.git
2677f9404b42bfb87e26402dc878fe08378c1129)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/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/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.4
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.3
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
$ 
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -simplifycfg -newgvn -instcombine -polly-mse -polly-optree -o
small-opt.bc small.bc
optpolly: /home/su/software/tmp/polly/llvm/include/llvm/Support/Casting.h:106:
static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
llvm::StoreInst; From = llvm::Instruction]: Assertion `Val && "isa<> used on a
null pointer"' failed.
#0 0x00000000039745c5 (optpolly+0x39745c5)
#1 0x0000000003974658 (optpolly+0x3974658)
#2 0x000000000397289f (optpolly+0x397289f)
#3 0x0000000003973e3a (optpolly+0x3973e3a)
#4 0x00007fd5bd2a4390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#5 0x00007fd5bc016428 gsignal
/build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#6 0x00007fd5bc01802a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
#7 0x00007fd5bc00ebd7 __assert_fail_base
/build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
#8 0x00007fd5bc00ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#9 0x00000000018d3fd0 (optpolly+0x18d3fd0)
#10 0x00000000018d3564 (optpolly+0x18d3564)
#11 0x0000000001ba954e (optpolly+0x1ba954e)
#12 0x0000000001ba88b1 (optpolly+0x1ba88b1)
#13 0x0000000003cbbfbb (optpolly+0x3cbbfbb)
#14 0x0000000003cbc1dd (optpolly+0x3cbc1dd)
#15 0x0000000003ca64b2 (optpolly+0x3ca64b2)
#16 0x0000000003ca897a (optpolly+0x3ca897a)
#17 0x0000000003d7a943 (optpolly+0x3d7a943)
#18 0x0000000002acfaf0 (optpolly+0x2acfaf0)
#19 0x00000000031f6f6e (optpolly+0x31f6f6e)
#20 0x00000000031f7107 (optpolly+0x31f7107)
#21 0x00000000031f7482 (optpolly+0x31f7482)
#22 0x00000000031f7b97 (optpolly+0x31f7b97)
#23 0x00000000031f7da3 (optpolly+0x31f7da3)
#24 0x000000000172ca2e (optpolly+0x172ca2e)
#25 0x00007fd5bc001830 __libc_start_main
/build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
#26 0x0000000001704069 (optpolly+0x1704069)
Stack dump:
0.      Program arguments: optpolly -simplifycfg -newgvn -instcombine
-polly-mse -polly-optree -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 - Forward operand tree' on basic block '%for.cond'
Aborted (core dumped)
$ 


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


void foo ()
{
  int a, b, c;
  for (b = 0; b < 16; b++)
    {
      a = b;
      for (c = 8; c; c--)
        if (a)
          a = a / 2;
      c = a;
    }
}

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/20170904/bc5f0d34/attachment-0001.html>


More information about the llvm-bugs mailing list