<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 - Assert "Non-zero loop cost expected" failed (since "[SLP] avoid reduction transform on patterns that the backend can load-combine")"
href="https://bugs.llvm.org/show_bug.cgi?id=43582">43582</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assert "Non-zero loop cost expected" failed (since "[SLP] avoid reduction transform on patterns that the backend can load-combine")
</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>All
</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>Global Analyses
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>martin@martin.st
</td>
</tr>
<tr>
<th>CC</th>
<td>a.bataev@hotmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22636" name="attach_22636" title="Sample reproduction file">attachment 22636</a> <a href="attachment.cgi?id=22636&action=edit" title="Sample reproduction file">[details]</a></span>
Sample reproduction file
Since SVN r373833, "[SLP] avoid reduction transform on patterns that the
backend can load-combine", I'm seeing large regressions in building lots of
different projects (Qt, freetype, orc jit, libav/ffmpeg, SDL_image) across 4
architectures (i386, x86_64, arm and aarch64).
$ clang -target x86_64-w64-mingw32 -c -O2 cff-x86_64.c
clang-10: ../lib/Transforms/Vectorize/LoopVectorize.cpp:5179: unsigned int
llvm::LoopVectorizationCostModel::selectInterleaveCount(unsigned int, unsigned
int): Assertion `LoopCost && "Non-zero loop cost expected"' failed.
Stack dump:
0. Program arguments: /home/martin/clang-nightly-mon/bin/clang-10 -cc1
-triple x86_64-w64-windows-gnu -emit-obj -disable-free -main-file-name
cff-x86_64.c -mrelocation-model pic -pic-level 2 -mthread-model posix
-mframe-pointer=none -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir /home/martin/clang-nightly-mon/lib/clang/10.0.0 -internal-isystem
/home/martin/clang-nightly-mon/lib/clang/10.0.0/include -internal-isystem
/home/martin/clang-nightly/x86_64-w64-mingw32/sys-root/mingw/include
-internal-isystem /home/martin/clang-nightly/x86_64-w64-mingw32/include
-internal-isystem /home/martin/clang-nightly/include -O2
-fdebug-compilation-dir /home/martin -ferror-limit 19 -fmessage-length 0
-fno-use-cxa-atexit -fobjc-runtime=gcc -fseh-exceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-faddrsig -o cff-x86_64.o -x c cff-x86_64.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'cff-x86_64.c'.
4. Running pass 'Loop Vectorization' on function '@cff_index_get_pointers'
#0 0x000055743caa22da llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/clang-nightly-mon/bin/clang-10+0x202f2da)
#1 0x000055743ca9ffb4 llvm::sys::RunSignalHandlers()
(/home/martin/clang-nightly-mon/bin/clang-10+0x202cfb4)
#2 0x000055743caa00f2 (/home/martin/clang-nightly-mon/bin/clang-10+0x202d0f2)
#3 0x00007f56ce68d890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007f56cd33ee97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007f56cd340801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007f56cd33039a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007f56cd330412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x000055743cc06f15
llvm::LoopVectorizationCostModel::selectInterleaveCount(unsigned int, unsigned
int) (/home/martin/clang-nightly-mon/bin/clang-10+0x2193f15)
#9 0x000055743cc0955f llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(/home/martin/clang-nightly-mon/bin/clang-10+0x219655f)
#10 0x000055743cc0b361 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*)
(/home/martin/clang-nightly-mon/bin/clang-10+0x2198361)
#11 0x000055743cc0ba14 (/home/martin/clang-nightly-mon/bin/clang-10+0x2198a14)
#12 0x000055743c512dc9 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/clang-nightly-mon/bin/clang-10+0x1a9fdc9)
#13 0x000055743c512e99 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/clang-nightly-mon/bin/clang-10+0x1a9fe99)
#14 0x000055743c512021 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/clang-nightly-mon/bin/clang-10+0x1a9f021)
#15 0x000055743ccb92a7 (/home/martin/clang-nightly-mon/bin/clang-10+0x22462a7)
#16 0x000055743ccbabac clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/clang-nightly-mon/bin/clang-10+0x2247bac)
#17 0x000055743d74aa2d (/home/martin/clang-nightly-mon/bin/clang-10+0x2cd7a2d)
#18 0x000055743e152a09 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/clang-nightly-mon/bin/clang-10+0x36dfa09)
#19 0x000055743d748540 clang::CodeGenAction::ExecuteAction()
(/home/martin/clang-nightly-mon/bin/clang-10+0x2cd5540)
#20 0x000055743d198a09 clang::FrontendAction::Execute()
(/home/martin/clang-nightly-mon/bin/clang-10+0x2725a09)
#21 0x000055743d15b799
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/clang-nightly-mon/bin/clang-10+0x26e8799)
#22 0x000055743d24579c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/clang-nightly-mon/bin/clang-10+0x27d279c)
#23 0x000055743b73c20f cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/clang-nightly-mon/bin/clang-10+0xcc920f)
#24 0x000055743b6d833a main
(/home/martin/clang-nightly-mon/bin/clang-10+0xc6533a)
#25 0x00007f56cd321b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#26 0x000055743b73796a _start
(/home/martin/clang-nightly-mon/bin/clang-10+0xcc496a)</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>