<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 - ICE: UNREACHABLE executed at llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6481!"
href="https://bugs.llvm.org/show_bug.cgi?id=46950">46950</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE: UNREACHABLE executed at llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6481!
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Vsevolod.Livinskij@frtk.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Error:
<span class="quote">>$ clang++ -O2 func.cpp -c</span >
Instr did not go through cost modelling?
UNREACHABLE executed at llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6481!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang++ -O2 func.cpp -c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'func.cpp'.
4. Running pass 'Loop Vectorization' on function '@_Z4testv'
#0 0x000055e4c6f287fe llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(clang-12+0x23de7fe)
#1 0x000055e4c6f265d4 llvm::sys::RunSignalHandlers() (clang-12+0x23dc5d4)
#2 0x000055e4c6f26851 llvm::sys::CleanupOnSignal(unsigned long)
(clang-12+0x23dc851)
#3 0x000055e4c6e93248 CrashRecoverySignalHandler(int) (clang-12+0x2349248)
#4 0x00007f910ef56540 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x15540)
#5 0x00007f910e9eb3eb raise
/build/glibc-5mDdLG/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#6 0x00007f910e9ca899 abort /build/glibc-5mDdLG/glibc-2.30/stdlib/abort.c:81:7
#7 0x000055e4c6e9b03e (clang-12+0x235103e)
#8 0x000055e4c70c5104
llvm::LoopVectorizationCostModel::getInstructionCost(llvm::Instruction*,
unsigned int,
llvm::Type*&)::'lambda'(llvm::Instruction*)::operator()(llvm::Instruction*)
const (.isra.0) (clang-12+0x257b104)
#9 0x000055e4c70d8e7e
llvm::LoopVectorizationCostModel::getInstructionCost(llvm::Instruction*,
unsigned int, llvm::Type*&) (clang-12+0x258ee7e)
#10 0x000055e4c70dd825
llvm::LoopVectorizationCostModel::getInstructionCost(llvm::Instruction*,
unsigned int) (.localalias) (clang-12+0x2593825)
#11 0x000055e4c70de673 llvm::LoopVectorizationCostModel::expectedCost(unsigned
int) (clang-12+0x2594673)
#12 0x000055e4c70deb39
llvm::LoopVectorizationCostModel::selectVectorizationFactor(unsigned int)
(clang-12+0x2594b39)
#13 0x000055e4c70f1a0c llvm::LoopVectorizationPlanner::plan(unsigned int,
unsigned int) (clang-12+0x25a7a0c)
#14 0x000055e4c70f435e llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(clang-12+0x25aa35e)
#15 0x000055e4c70f6d60 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*)
(clang-12+0x25acd60)
#16 0x000055e4c70f71f7 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&) (clang-12+0x25ad1f7)
#17 0x000055e4c685d911 llvm::FPPassManager::runOnFunction(llvm::Function&)
(clang-12+0x1d13911)
#18 0x000055e4c685e009 llvm::FPPassManager::runOnModule(llvm::Module&)
(clang-12+0x1d14009)
#19 0x000055e4c685caac llvm::legacy::PassManagerImpl::run(llvm::Module&)
(clang-12+0x1d12aac)
#20 0x000055e4c71d4bb9 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) (clang-12+0x268abb9)
#21 0x000055e4c71d66b5 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> >) (clang-12+0x268c6b5)
#22 0x000055e4c7ed4781
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(clang-12+0x338a781)
#23 0x000055e4c8d15cb9 clang::ParseAST(clang::Sema&, bool, bool)
(clang-12+0x41cbcb9)
#24 0x000055e4c7ed31c8 clang::CodeGenAction::ExecuteAction()
(clang-12+0x33891c8)
#25 0x000055e4c7808389 clang::FrontendAction::Execute() (clang-12+0x2cbe389)
#26 0x000055e4c77bf066
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(clang-12+0x2c75066)
#27 0x000055e4c78dc780
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (clang-12+0x2d92780)
#28 0x000055e4c57a4a71 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (clang-12+0xc5aa71)
#29 0x000055e4c57a1da8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(clang-12+0xc57da8)
#30 0x000055e4c767e289 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const::'lambda'()>(long) (clang-12+0x2b34289)
#31 0x000055e4c6e933cc
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(clang-12+0x23493cc)
#32 0x000055e4c767eba6
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const (.part.0) (clang-12+0x2b34ba6)
#33 0x000055e4c76560fc
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (clang-12+0x2b0c0fc)
#34 0x000055e4c7656a36
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(clang-12+0x2b0ca36)
#35 0x000055e4c765fdb9
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(clang-12+0x2b15db9)
#36 0x000055e4c5723279 main (clang-12+0xbd9279)
#37 0x00007f910e9cc1e3 __libc_start_main
/build/glibc-5mDdLG/glibc-2.30/csu/../csu/libc-start.c:342:3
#38 0x000055e4c57a18fe _start (clang-12+0xc578fe)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
3b0d30ffd30a704d09a34031d8797e22b708caab)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /bin
Reproducer:
extern int var_1;
extern unsigned short var_13;
extern int arr_3[25];
extern long arr_117[];
void test() {
for (short a = 0; a < 10; a = 505)
for (; 0 < (char)var_1;)
for (;;)
for (int b = var_13; b < 20; b += var_13)
arr_117[b] = b ? 0 : arr_3[a];
Clang version:
12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
3b0d30ffd30a704d09a34031d8797e22b708caab)</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>