<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 Assertion `!isa<SCEVCouldNotCompute>(BackedgeTakenCount) && "Invalid loop count"' failed."
href="https://bugs.llvm.org/show_bug.cgi?id=52327">52327</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt crashes with Assertion `!isa<SCEVCouldNotCompute>(BackedgeTakenCount) && "Invalid loop count"' 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>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>Loop Optimizer
</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=25394" name="attach_25394" title="bbi-62009.ll reproducer">attachment 25394</a> <a href="attachment.cgi?id=25394&action=edit" title="bbi-62009.ll reproducer">[details]</a></span>
bbi-62009.ll reproducer
llvm commit: e42f5d4b488e
Reproduce with:
opt -passes="loop(indvars,require<access-info>),loop-vectorize" -o /dev/null
bbi-62009.ll
Result:
opt: ../lib/Transforms/Vectorize/LoopVectorize.cpp:3125: llvm::Value
*llvm::InnerLoopVectorizer::getOrCreateTripCount(llvm::Loop *): Assertion
`!isa<SCEVCouldNotCompute>(BackedgeTakenCount) && "Invalid loop count"' 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: ../../master-github/llvm/build-all/bin/opt
-passes=loop(indvars,require<access-info>),loop-vectorize -o /dev/null
bbi-62009.ll
#0 0x0000000002b7d9f3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(../../master-github/llvm/build-all/bin/opt+0x2b7d9f3)
#1 0x0000000002b7b66e llvm::sys::RunSignalHandlers()
(../../master-github/llvm/build-all/bin/opt+0x2b7b66e)
#2 0x0000000002b7dd76 SignalHandler(int) Signals.cpp:0:0
#3 0x00007fc514b80630 __restore_rt sigaction.c:0:0
#4 0x00007fc5122b3387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007fc5122b4a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007fc5122ac1a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007fc5122ac252 (/lib64/libc.so.6+0x2f252)
#8 0x0000000002d16d9e
llvm::InnerLoopVectorizer::getOrCreateTripCount(llvm::Loop*)
(../../master-github/llvm/build-all/bin/opt+0x2d16d9e)
#9 0x0000000002d19f16
llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton()
(../../master-github/llvm/build-all/bin/opt+0x2d19f16)
#10 0x0000000002d3efdd
llvm::LoopVectorizationPlanner::executePlan(llvm::InnerLoopVectorizer&,
llvm::DominatorTree*) (../../master-github/llvm/build-all/bin/opt+0x2d3efdd)
#11 0x0000000002d510ae llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(../../master-github/llvm/build-all/bin/opt+0x2d510ae)
#12 0x0000000002d52f92 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(../../master-github/llvm/build-all/bin/opt+0x2d52f92)
#13 0x0000000002d53a79 llvm::LoopVectorizePass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all/bin/opt+0x2d53a79)
#14 0x0000000002e6f81d llvm::detail::PassModel<llvm::Function,
llvm::LoopVectorizePass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#15 0x000000000231ebd5 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all/bin/opt+0x231ebd5)
#16 0x0000000000adb57d 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 >
#17 0x0000000002322f6a llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x2322f6a)
#18 0x000000000079107d llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#19 0x000000000231dd18 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x231dd18)
#20 0x0000000000788ea2 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)
(../../master-github/llvm/build-all/bin/opt+0x788ea2)
#21 0x000000000079bb8d main
(../../master-github/llvm/build-all/bin/opt+0x79bb8d)
#22 0x00007fc51229f555 __libc_start_main (/lib64/libc.so.6+0x22555)
#23 0x00000000007842fc _start
(../../master-github/llvm/build-all/bin/opt+0x7842fc)
Abort
This starts happening with commit 16370e02a71
[IndVars] Provide eliminateIVComparison with context
We can prove more predicates when we have a context when eliminating ICmp.
As first (and very obvious) approximation we can use the ICmp instruction
itself,
though in the future we are going to use a common dominator of all its
users.
Need some refactoring before that.
Observed ~0.5% negative compile time impact.
Differential Revision: <a href="https://reviews.llvm.org/D98697">https://reviews.llvm.org/D98697</a>
Reviewed By: lebedev.ri</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>