<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 - ADCE crashing when calculating IDF"
href="https://bugs.llvm.org/show_bug.cgi?id=37323">37323</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ADCE crashing when calculating IDF
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>new bugs
</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=20258" name="attach_20258" title="reproducer">attachment 20258</a> <a href="attachment.cgi?id=20258&action=edit" title="reproducer">[details]</a></span>
reproducer
Running
opt -loop-simplify -postdomtree -licm -adce -S -o - tr15955.ll
crashes when running ADCE
Program received signal SIGSEGV, Segmentation fault.
llvm::DomTreeNodeBase<llvm::BasicBlock>::getIDom (this=0x0) at
../include/llvm/Support/GenericDomTree.h:82
82 DomTreeNodeBase *getIDom() const { return IDom; }
(gdb) where
#0 llvm::DomTreeNodeBase<llvm::BasicBlock>::getIDom (this=0x0) at
../include/llvm/Support/GenericDomTree.h:82
#1 0x00000000025d8847 in llvm::IDFCalculator<llvm::Inverse<llvm::BasicBlock*>,
true>::calculate (this=0x7fffffffbfa0, PHIBlocks=llvm::SmallVector of length 2,
capacity 32 = {...}) at ../lib/Analysis/IteratedDominanceFrontier.cpp:64
#2 0x0000000003195083 in (anonymous
namespace)::AggressiveDeadCodeElimination::markLiveBranchesFromControlDependences
(this=0x7fffffffc258) at ../lib/Transforms/Scalar/ADCE.cpp:485
#3 0x0000000003191ea4 in (anonymous
namespace)::AggressiveDeadCodeElimination::markLiveInstructions
(this=0x7fffffffc258) at ../lib/Transforms/Scalar/ADCE.cpp:371
#4 0x0000000003190902 in (anonymous
namespace)::AggressiveDeadCodeElimination::performDeadCodeElimination
(this=0x7fffffffc258) at ../lib/Transforms/Scalar/ADCE.cpp:204
#5 0x0000000003190ddd in (anonymous namespace)::ADCELegacyPass::runOnFunction
(this=0x66ad460, F=...) at ../lib/Transforms/Scalar/ADCE.cpp:701
#6 0x0000000002cb0d5d in llvm::FPPassManager::runOnFunction (this=0x66ac2f0,
F=...) at ../lib/IR/LegacyPassManager.cpp:1520
#7 0x0000000002cb1095 in llvm::FPPassManager::runOnModule (this=0x66ac2f0,
M=...) at ../lib/IR/LegacyPassManager.cpp:1541
#8 0x0000000002cb187e in (anonymous namespace)::MPPassManager::runOnModule
(this=0x667e0a0, M=...) at ../lib/IR/LegacyPassManager.cpp:1597
#9 0x0000000002cb137b in llvm::legacy::PassManagerImpl::run (this=0x667fee0,
M=...) at ../lib/IR/LegacyPassManager.cpp:1700
#10 0x0000000002cb1dc1 in llvm::legacy::PassManager::run (this=0x7fffffffd460,
M=...) at ../lib/IR/LegacyPassManager.cpp:1731
#11 0x0000000000c115f5 in main (argc=10, argv=0x7fffffffda98) at
../tools/opt/opt.cpp:761
Is perhaps DT not up to date?
This starts happening with r317335:
[LICM] sink through non-trivially replicable PHI
Summary:
The current LICM allows sinking an instruction only when it is exposed to
exit
blocks through a trivially replacable PHI of which all incoming values are
the
same instruction. This change enhance LICM to sink a sinkable instruction
through non-trivially replacable PHIs by spliting predecessors of loop
exits.
Does LICM invalidate DT? Currently it does
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();
AU.addRequired<TargetLibraryInfoWrapperPass>();
if (EnableMSSALoopDependency)
AU.addRequired<MemorySSAWrapperPass>();
AU.addRequired<TargetTransformInfoWrapperPass>();
getLoopAnalysisUsage(AU);
}
is this correct?</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>