<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 -gvn fails with Assertion `!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"'"
href="https://bugs.llvm.org/show_bug.cgi?id=49893">49893</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt -gvn fails with Assertion `!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"'
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Transformation Utilities
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikael.holmen@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24732" name="attach_24732" title="bbi-b4783.ll reproducer">attachment 24732</a> <a href="attachment.cgi?id=24732&action=edit" title="bbi-b4783.ll reproducer">[details]</a></span>
bbi-b4783.ll reproducer
Reproduce with:
opt -S -gvn -o - bbi-54783.ll
Result:
opt: ../lib/Transforms/Utils/BreakCriticalEdges.cpp:117: llvm::BasicBlock
*llvm::SplitKnownCriticalEdge(llvm::Instruction *, unsigned int, const
llvm::CriticalEdgeSplittingOptions &, const llvm::Twine &): Assertion
`!isa<IndirectBrInst>(TI) && "Cannot split critical edge from IndirectBrInst"'
failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0. Program arguments: /repo/uabelho/master-github/llvm/build-all/bin/opt
-S -gvn -o - bbi-54783.ll
#0 0x000000000294ad33 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x294ad33)
#1 0x00000000029489ee llvm::sys::RunSignalHandlers()
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x29489ee)
#2 0x000000000294b1f6 SignalHandler(int) Signals.cpp:0:0
#3 0x00007f14f6ed0630 __restore_rt sigaction.c:0:0
#4 0x00007f14f4603387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f14f4604a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007f14f45fc1a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007f14f45fc252 (/lib64/libc.so.6+0x2f252)
#8 0x0000000002974451 llvm::SplitKnownCriticalEdge(llvm::Instruction*,
unsigned int, llvm::CriticalEdgeSplittingOptions const&, llvm::Twine const&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x2974451)
#9 0x0000000002654f87 llvm::GVN::splitCriticalEdges(llvm::BasicBlock*,
llvm::BasicBlock*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x2654f87)
#10 0x000000000265c52f llvm::GVN::addDeadBlock(llvm::BasicBlock*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x265c52f)
#11 0x000000000265a77f llvm::GVN::processFoldableCondBr(llvm::BranchInst*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x265a77f)
#12 0x0000000002659ddd llvm::GVN::processInstruction(llvm::Instruction*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x2659ddd)
#13 0x000000000265b305 llvm::GVN::processBlock(llvm::BasicBlock*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x265b305)
#14 0x000000000265a870 llvm::GVN::iterateOnFunction(llvm::Function&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x265a870)
#15 0x0000000002650a6d llvm::GVN::runImpl(llvm::Function&,
llvm::AssumptionCache&, llvm::DominatorTree&, llvm::TargetLibraryInfo const&,
llvm::AAResults&, llvm::MemoryDependenceResults*, llvm::LoopInfo*,
llvm::OptimizationRemarkEmitter*, llvm::MemorySSA*)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x2650a6d)
#16 0x000000000265022c llvm::GVN::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x265022c)
#17 0x0000000002bfe79d llvm::detail::PassModel<llvm::Function, llvm::GVN,
llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>
<span class="quote">>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0</span >
#18 0x000000000217c769 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x217c769)
#19 0x0000000000a8a3cd llvm::detail::PassModel<llvm::Function,
llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >,
llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>
<span class="quote">>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0</span >
#20 0x0000000002180f66 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x2180f66)
#21 0x000000000077563d llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#22 0x000000000217b5cb llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x217b5cb)
#23 0x000000000076e543 llvm::runPassPipeline(llvm::StringRef, llvm::Module&,
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*,
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef,
llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind,
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool)
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x76e543)
#24 0x000000000077f236 main
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x77f236)
#25 0x00007f14f45ef555 __libc_start_main (/lib64/libc.so.6+0x22555)
#26 0x0000000000769705 _start
(/repo/uabelho/master-github/llvm/build-all/bin/opt+0x769705)
Abort</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>