<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - polly crashes with "opt -simplifycfg -newgvn -instcombine -polly-mse -polly-optree" while running pass 'Polly - Forward operand tree'"
   href="https://bugs.llvm.org/show_bug.cgi?id=34457">34457</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>polly crashes with "opt -simplifycfg -newgvn -instcombine -polly-mse -polly-optree" while running pass 'Polly - Forward operand tree'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>su@cs.ucdavis.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clangpolly -v
clang version 6.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
9b9a71803226ccc3c9310312967117875b9ff77e) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
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; 
}</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>