<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 - fatal error: error in backend: Invalid size request on a scalable vector"
href="https://bugs.llvm.org/show_bug.cgi?id=52064">52064</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fatal error: error in backend: Invalid size request on a scalable vector
</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>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>gilles@rist.or.jp
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=25322" name="attach_25322" title="reproducer (preprocessed and script)">attachment 25322</a> <a href="attachment.cgi?id=25322&action=edit" title="reproducer (preprocessed and script)">[details]</a></span>
reproducer (preprocessed and script)
The attached reproducer can be used to evidence a crash with LLVM 13.0.0.
/* Version 13.0 is currently available in this bugzilla */
The test passes with LLVM 12.0.0 and the main branch.
FWIW, a workaround is to replace the SimdFBool constructor with
this->simdInternal_ = svdup_n_b32(b);
This works find with LLVM 13.0.0 and above, but fails with LLVM 12.0.1, and it
seems the root cause is __builtin_sve_svdup_n_b32() subroutine is not
implemented
(please let me know if you want me top open an other bug for that)
$ cat reproducer.cpp
#include <arm_sve.h>
class SimdFBool
{
private:
typedef svbool_t simdInternalType_
__attribute__((arm_sve_vector_bits(512)));
public:
SimdFBool(const bool b)
{
this->simdInternal_ = b?svptrue_b32():svpfalse_b();
}
simdInternalType_ simdInternal_;
};
static inline bool anyTrue(SimdFBool a)
{
svbool_t pg = svptrue_b32();
return svptest_any(pg, a.simdInternal_);
}
void _settleTemplate(
bool* bErrorHasOccurred)
{
SimdFBool bError = SimdFBool(false);
*bErrorHasOccurred = anyTrue(bError);
}
$ clang++ -march=armv8.2-a+sve -O1 -msve-vector-bits=512 -c reproducer.cpp
fatal error: error in backend: Invalid size request on a scalable vector.
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++ -march=armv8.2-a+sve -O1
-msve-vector-bits=512 -c reproducer.cpp
1. <eof> parser at end of file
2. Optimizer
#0 0x000000000296cacc PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000000000296b070 llvm::sys::CleanupOnSignal(unsigned long)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x296b070)
#2 0x00000000028d33f4 llvm::CrashRecoveryContext::HandleExit(int)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x28d33f4)
#3 0x0000000002965274 llvm::sys::Process::Exit(int, bool)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x2965274)
#4 0x00000000009a77f4 LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool) cc1_main.cpp:0:0
#5 0x00000000028d9994 llvm::report_fatal_error(llvm::Twine const&, bool)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x28d9994)
#6 0x00000000028d9b10 llvm::install_bad_alloc_error_handler(void (*)(void*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, bool), void*)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x28d9b10)
#7 0x000000000291dc6c
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x291dc6c)
#8 0x000000000291dca8 llvm::TypeSize::operator unsigned long() const
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x291dca8)
#9 0x0000000001a88ad0 llvm::ConstantFoldLoadThroughBitcast(llvm::Constant*,
llvm::Type*, llvm::DataLayout const&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1a88ad0)
#10 0x0000000001b13ea4 llvm::FindAvailableLoadedValue(llvm::LoadInst*,
llvm::AAResults&, bool*, unsigned int)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1b13ea4)
#11 0x0000000002462730 llvm::InstCombinerImpl::visitLoadInst(llvm::LoadInst&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x2462730)
#12 0x00000000023d9954 llvm::InstCombinerImpl::run()
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x23d9954)
#13 0x00000000023db930 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&,
llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*,
llvm::ProfileSummaryInfo*, unsigned int, llvm::LoopInfo*)
InstructionCombining.cpp:0:0
#14 0x00000000023dc8f8 llvm::InstCombinePass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x23dc8f8)
#15 0x00000000037eb728 llvm::detail::PassModel<llvm::Function,
llvm::InstCombinePass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x37eb728)
#16 0x0000000000beccb0 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>&)</span >
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0xbeccb0)
#17 0x0000000001a708ac
llvm::CGSCCToFunctionPassAdaptor::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1a708ac)
#18 0x0000000000be1f58 llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::CGSCCToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0xbe1f58)
#19 0x0000000001a6a7e8 llvm::PassManager<llvm::LazyCallGraph::SCC,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1a6a7e8)
#20 0x00000000022eb968 llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::PassManager<llvm::LazyCallGraph::SCC,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x22eb968)
#21 0x0000000001a6dab4
llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1a6dab4)
#22 0x00000000022eb938 llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::DevirtSCCRepeatedPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x22eb938)
#23 0x0000000001a6b654
llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x1a6b654)
#24 0x00000000022ef22c llvm::ModuleInlinerWrapperPass::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x22ef22c)
#25 0x00000000037ec7d8 llvm::detail::PassModel<llvm::Module,
llvm::ModuleInlinerWrapperPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x37ec7d8)
#26 0x00000000021ea2d4 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x21ea2d4)
#27 0x0000000002c193d0 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0)
BackendUtil.cpp:0:0
#28 0x0000000002c1d484 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x2c1d484)
#29 0x0000000003791e24
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x3791e24)
#30 0x00000000040aec40 clang::ParseAST(clang::Sema&, bool, bool)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x40aec40)
#31 0x00000000031c439c clang::FrontendAction::Execute()
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x31c439c)
#32 0x000000000316add8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x316add8)
#33 0x00000000032640dc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x32640dc)
#34 0x00000000009a81dc cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x9a81dc)
#35 0x00000000009a5a30 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#36 0x000000000303904c 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) Job.cpp:0:0
#37 0x00000000028d3228
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x28d3228)
#38 0x00000000030393d0
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) Job.cpp:0:0
#39 0x0000000003014e6c
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x3014e6c)
#40 0x0000000003015604
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x3015604)
#41 0x0000000003021e28
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x3021e28)
#42 0x00000000009021f4 main
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x9021f4)
#43 0x0000ffff9cd20d64 __libc_start_main (/lib64/libc.so.6+0x20d64)
#44 0x00000000009a53d0 _start
(/home/users/EDITED/local/llvm-13.0.0/bin/clang-13+0x9a53d0)
clang-13: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 13.0.0
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/users/EDITED/local/llvm-13.0.0/bin</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>