<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: Error while trying to spill X30 from class GPR: Cannot scavenge register without an emergency spill slot!"
href="https://bugs.llvm.org/show_bug.cgi?id=50539">50539</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fatal error: error in backend: Error while trying to spill X30 from class GPR: Cannot scavenge register without an emergency spill slot!
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>minho1.ha@sk.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Here is the error log
fatal error: error in backend: Error while trying to spill X30 from class GPR:
Cannot scavenge register without an emergency spill slot!
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++ --target=riscv64-unknown-elf
-march=rv64gcv1p0 -mabi=lp64d -menable-experimental-extensions -O2 -c -o
riscv_aligned_3.o riscv_aligned_3.cpp -static
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'riscv_aligned_3.cpp'.
4. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on
function '@_Z28embeddingbag_forward_blk1024iiiPfS_Pi'
#0 0x00007fc98620626a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0x1a126a)
#1 0x00007fc986204014 llvm::sys::RunSignalHandlers()
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0x19f014)
#2 0x00007fc986204285 llvm::sys::CleanupOnSignal(unsigned long)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0x19f285)
#3 0x00007fc98610e262 llvm::CrashRecoveryContext::HandleExit(int)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0xa9262)
#4 0x00007fc9861fcec7 llvm::sys::Process::Exit(int)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0x197ec7)
#5 0x000055f43cd96f71 LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/home/mhha/_install2/bin/clang-12+0x11f71)
#6 0x00007fc986126849 llvm::report_fatal_error(llvm::Twine const&, bool)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0xc1849)
#7 0x00007fc986126988
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0xc1988)
#8 0x00007fc9887378b0 llvm::RegScavenger::spill(llvm::Register,
llvm::TargetRegisterClass const&, int,
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>,
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x40d8b0)
#9 0x00007fc98873848e
llvm::RegScavenger::scavengeRegisterBackwards(llvm::TargetRegisterClass const&,
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, bool, int, bool)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x40e48e)
#10 0x00007fc988738931 scavengeVReg(llvm::MachineRegisterInfo&,
llvm::RegScavenger&, llvm::Register, bool)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x40e931)
#11 0x00007fc988738bee
scavengeFrameVirtualRegsInBlock(llvm::MachineRegisterInfo&,
llvm::RegScavenger&, llvm::MachineBasicBlock&)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x40ebee)
#12 0x00007fc988738c90 llvm::scavengeFrameVirtualRegs(llvm::MachineFunction&,
llvm::RegScavenger&)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x40ec90)
#13 0x00007fc9886c9b9d (anonymous
namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x39fb9d)
#14 0x00007fc9885c2f48
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/mhha/_install2/bin/../lib/libLLVMCodeGen.so.12git+0x298f48)
#15 0x00007fc986527e87 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/mhha/_install2/bin/../lib/libLLVMCore.so.12git+0x1d7e87)
#16 0x00007fc9865285a1 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/mhha/_install2/bin/../lib/libLLVMCore.so.12git+0x1d85a1)
#17 0x00007fc9865271ff llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/mhha/_install2/bin/../lib/libLLVMCore.so.12git+0x1d71ff)
#18 0x00007fc9889c0b68 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/mhha/_install2/bin/../lib/libclangCodeGen.so.12git+0xe2b68)
#19 0x00007fc9889c271c 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/mhha/_install2/bin/../lib/libclangCodeGen.so.12git+0xe471c)
#20 0x00007fc988cd6e44
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/mhha/_install2/bin/../lib/libclangCodeGen.so.12git+0x3f8e44)
#21 0x00007fc98406bc99 clang::ParseAST(clang::Sema&, bool, bool)
(/home/mhha/_install2/bin/../lib/../lib/libclangParse.so.12git+0x34c99)
#22 0x00007fc987b34499 clang::FrontendAction::Execute()
(/home/mhha/_install2/bin/../lib/libclangFrontend.so.12git+0xec499)
#23 0x00007fc987ae7e4b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/mhha/_install2/bin/../lib/libclangFrontend.so.12git+0x9fe4b)
#24 0x00007fc9898eeebb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/mhha/_install2/bin/../lib/libclangFrontendTool.so.12git+0x4ebb)
#25 0x000055f43cd9837c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/mhha/_install2/bin/clang-12+0x1337c)
#26 0x000055f43cd950bd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/mhha/_install2/bin/clang-12+0x100bd)
#27 0x00007fc9878aecc5 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)
(/home/mhha/_install2/bin/../lib/libclangDriver.so.12git+0x8ccc5)
#28 0x00007fc98610e0f3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/mhha/_install2/bin/../lib/libLLVMSupport.so.12git+0xa90f3)
#29 0x00007fc9878af7a0
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.148)
(/home/mhha/_install2/bin/../lib/libclangDriver.so.12git+0x8d7a0)
#30 0x00007fc9878873e5
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/mhha/_install2/bin/../lib/libclangDriver.so.12git+0x653e5)
#31 0x00007fc987887e2f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/mhha/_install2/bin/../lib/libclangDriver.so.12git+0x65e2f)
#32 0x00007fc987892835
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/mhha/_install2/bin/../lib/libclangDriver.so.12git+0x70835)
#33 0x000055f43cd92fa1 main (/home/mhha/_install2/bin/clang-12+0xdfa1)
#34 0x00007fc9858f3bf7 __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#35 0x000055f43cd94c3a _start (/home/mhha/_install2/bin/clang-12+0xfc3a)
clang-12: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 12.0.0 (<a href="https://github.com/isrc-cas/rvv-llvm">https://github.com/isrc-cas/rvv-llvm</a>
5f23b7d7fb017b3c1011db27e7163019442264e7)
Target: riscv64-unknown-unknown-elf
Thread model: posix
InstalledDir: /home/mhha/_install2/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/riscv_aligned_3-06cd25.cpp
clang-12: note: diagnostic msg: /tmp/riscv_aligned_3-06cd25.sh
clang-12: note: diagnostic msg:
********************</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>