<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 - opt crashes with "opt -sroa -instcombine -simplifycfg -inline -instcombine -loop-rotate -loop-unswitch -newgvn -correlated-propagation": Assertion `BI->getSuccessor(!isTrueDest) == BBTo && "BBTo isn't a successor of BBFrom"' failed"
   href="https://bugs.llvm.org/show_bug.cgi?id=35801">35801</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt crashes with "opt -sroa -instcombine -simplifycfg -inline -instcombine -loop-rotate -loop-unswitch -newgvn -correlated-propagation": Assertion `BI->getSuccessor(!isTrueDest) == BBTo && "BBTo isn't a successor of BBFrom"' failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </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>Tested with trunk revision 321659. 

$ clangpolly -v
clang version 6.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
d9551a3cb4a454e0818e345bdba510e1cb6dbbdd) (llvm/trunk 321641)
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 -sroa -instcombine -simplifycfg -inline -instcombine -loop-rotate
-loop-unswitch -newgvn -correlated-propagation -o small-opt.bc small.bc
optpolly: /home/su/software/tmp/polly/llvm/lib/Analysis/LazyValueInfo.cpp:1213:
bool getEdgeValueLocal(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::ValueLatticeElement&): Assertion `BI->getSuccessor(!isTrueDest) == BBTo
&& "BBTo isn't a successor of BBFrom"' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x000000000205d92a (optpolly+0x205d92a)
#1 0x000000000205bade (optpolly+0x205bade)
#2 0x000000000205bc40 (optpolly+0x205bc40)
#3 0x00007f76406f4330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f763f4dcc37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f763f4e0028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f763f4d5bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f763f4d5ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001643358 (optpolly+0x1643358)
#9 0x0000000001646864 (optpolly+0x1646864)
#10 0x0000000001646a38 (optpolly+0x1646a38)
#11 0x0000000001e1df91 (optpolly+0x1e1df91)
#12 0x0000000001e1f6d6 (optpolly+0x1e1f6d6)
#13 0x0000000001b5c6cb (optpolly+0x1b5c6cb)
#14 0x00000000015ccc56 (optpolly+0x15ccc56)
#15 0x0000000001b5d33a (optpolly+0x1b5d33a)
#16 0x00000000008bb79f (optpolly+0x8bb79f)
#17 0x00007f763f4c7f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#18 0x000000000092d7d6 (optpolly+0x92d7d6)
Stack dump:
0.      Program arguments: optpolly -sroa -instcombine -simplifycfg -inline
-instcombine -loop-rotate -loop-unswitch -newgvn -correlated-propagation -o
small-opt.bc small.bc
1.      Running pass 'CallGraph Pass Manager' on module 'small.bc'.
2.      Running pass 'Value Propagation' on function '@g'
Aborted (core dumped)
$


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


int a, b, c;

int f (int p) { return p; }

void g ()

  unsigned d = 0;
  for (; a; d++)
    for (b = 0; b < 2; b++)
      { 
        c = f (a || (f (0), 0)) && d;
        if (c && a)
          a--;
      }
}

int main ()

  g ();
  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>