<html>
    <head>
      <base href="https://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 --- - Crash in MachineBlockPlacement"
   href="https://llvm.org/bugs/show_bug.cgi?id=28604">28604</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in MachineBlockPlacement
          </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>Linux
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sebpop@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16761" name="attach_16761" title="testcase">attachment 16761</a> <a href="attachment.cgi?id=16761&action=edit" title="testcase">[details]</a></span>
testcase

With the attached testcase llc crashes in MachineBlockPlacement:

$llc a.ll
#0 0x00007f6135cedae0 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/spop/s/llvm-project/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x00007f6135cede7f PrintStackTraceSignalHandler(void*)
/home/spop/s/llvm-project/llvm/lib/Support/Unix/Signals.inc:470:0
#2 0x00007f6135cebf27 llvm::sys::RunSignalHandlers()
/home/spop/s/llvm-project/llvm/lib/Support/Signals.cpp:44:0
#3 0x00007f6135ced327 SignalHandler(int)
/home/spop/s/llvm-project/llvm/lib/Support/Unix/Signals.inc:256:0
#4 0x00007f6134b81250 (/lib/x86_64-linux-gnu/libc.so.6+0x35250)
#5 0x00007f6138520e86 llvm::SmallVectorTemplateCommon<llvm::MachineBasicBlock*,
void>::begin()
/home/spop/s/llvm-project/llvm/include/llvm/ADT/SmallVector.h:113:0
#6 0x00007f6138520e86 (anonymous namespace)::BlockChain::begin()
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineBlockPlacement.cpp:179:0
#7 0x00007f6138523375 (anonymous
namespace)::MachineBlockPlacement::findBestLoopTop(llvm::MachineLoop&,
llvm::SmallPtrSet<llvm::MachineBasicBlock*, 16u> const&)
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineBlockPlacement.cpp:908:0
#8 0x00007f61385257da (anonymous
namespace)::MachineBlockPlacement::buildLoopChains(llvm::MachineLoop&)
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1317:0
#9 0x00007f61385265b5 (anonymous
namespace)::MachineBlockPlacement::buildCFGChains()
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1442:0
#10 0x00007f6138527b8b (anonymous
namespace)::MachineBlockPlacement::runOnMachineFunction(llvm::MachineFunction&)
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1671:0
#11 0x00007f6138562e64
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/spop/s/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:0
#12 0x00007f6137ab84c0 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/spop/s/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1526:0
#13 0x00007f6137ab8659 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/spop/s/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1547:0
#14 0x00007f6137ab89d4 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/spop/s/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1603:0
#15 0x00007f6137ab90e9 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/spop/s/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1706:0
#16 0x00007f6137ab92f5 llvm::legacy::PassManager::run(llvm::Module&)
/home/spop/s/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1738:0
#17 0x000000000042ae84 compileModule(char**, llvm::LLVMContext&)
/home/spop/s/llvm-project/llvm/tools/llc/llc.cpp:489:0
#18 0x00000000004297f8 main
/home/spop/s/llvm-project/llvm/tools/llc/llc.cpp:265:0
#19 0x00007f6134b6cac0 __libc_start_main
/build/glibc-qbmteM/glibc-2.21/csu/libc-start.c:323:0
#20 0x0000000000427b19 _start
(/home/spop/s/llvm-project/ninja/bin/llc+0x427b19)
Stack dump:
0.    Program arguments: /home/spop/s/llvm-project/ninja/bin/llc
/home/spop/a.ll 
1.    Running pass 'Function Pass Manager' on module '/home/spop/a.ll'.
2.    Running pass 'Branch Probability Basic Block Placement' on function
'@foo'</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>