<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Assertion failed: (!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"), function SplitCriticalEdge"
   href="http://llvm.org/bugs/show_bug.cgi?id=21968">21968</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: (!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"), function SplitCriticalEdge
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dimitry@andric.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13574" name="attach_13574" title="Reduced test case for IndirectBrInst assertion failure">attachment 13574</a> <a href="attachment.cgi?id=13574&action=edit" title="Reduced test case for IndirectBrInst assertion failure">[details]</a></span>
Reduced test case for IndirectBrInst assertion failure

This is an assertion failure we encountered during the recent clang 3.5.0 ports
exp-run, while building the radare2 port [1]:

Assertion failed: (!isa<IndirectBrInst>(TI) && "Cannot split critical edge from
IndirectBrInst"), function SplitCriticalEdge, file
/zpoudriere/jails/head-amd64-PR195480/usr/src/lib/clang/libllvmtransformutils/../../../contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp,
line 148.
Stack dump:
0.    Program arguments: /usr/bin/cc -cc1 -triple x86_64-unknown-freebsd11.0
-emit-obj -disable-free -main-file-name json.c -mrelocation-model pic
-pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -gdwarf-2
-dwarf-column-info -coverage-file
/wrkdirs/usr/ports/devel/radare2/work/radare2-0.9.6/shlr/sdb/src/json.o
-resource-dir /usr/bin/../lib/clang/3.5.0 -dependency-file json.d -MT json.o
-sys-header-deps -D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 -D
_POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 -O2 -Wall -Wall
-fdebug-compilation-dir
/wrkdirs/usr/ports/devel/radare2/work/radare2-0.9.6/shlr/sdb/src -ferror-limit
19 -fmessage-length 0 -fvisibility hidden -stack-protector 1 -mstackrealign
-fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -o json.o -x c json.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'json.c'.
4.    Running pass 'Loop Pass Manager' on function '@js0n'
5.    Running pass 'Rotate Loops' on basic block '%for.cond'

This also reproduces with trunk r224516, with assertions enabled.  I have
reduced this to a small test case, which I am attaching.

Compile with: clang -cc1 -triple x86_64-unknown-linux -S -O1
radare-json-reduced.c

[1]
<a href="http://pb2.nyi.freebsd.org/data/head-amd64-PR195480-default/2014-12-12_23h17m02s/logs/errors/radare2-0.9.6.log">http://pb2.nyi.freebsd.org/data/head-amd64-PR195480-default/2014-12-12_23h17m02s/logs/errors/radare2-0.9.6.log</a></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>