<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/90787>90787</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Error while trying to spill UDE from class O24: Cannot scavenge register without an emergency spill slot!
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Orbisculating-Flerovium
      </td>
    </tr>
</table>

<pre>
    I was compiling my code and got the following error:
```
fatal error: error in backend: Error while trying to spill UDE from class O24: Cannot scavenge register without an emergency spill slot!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/CEdev/bin/ez80-clang -S -mllvm -profile-guided-section-prefix=false -Oz -W -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-main-return-type obj/lto.bc -o obj/lto.src
1.      Code generation
2.      Running pass 'Function Pass Manager' on module 'obj/lto.bc'.
3.      Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@playGame'
 #0 0x000000000176d293 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/CEdev/bin/ez80-clang+0x176d293)
 #1 0x000000000176b12e llvm::sys::RunSignalHandlers() (/opt/CEdev/bin/ez80-clang+0x176b12e)
 #2 0x000000000176c72d llvm::sys::CleanupOnSignal(unsigned long) (/opt/CEdev/bin/ez80-clang+0x176c72d)
 #3 0x00000000016f07aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
 #4 0x00000000016f074b (/opt/CEdev/bin/ez80-clang+0x16f074b)
 #5 0x00000000017675a7 llvm::sys::Process::Exit(int, bool) (/opt/CEdev/bin/ez80-clang+0x17675a7)
 #6 0x00000000009b65e2 (/opt/CEdev/bin/ez80-clang+0x9b65e2)
 #7 0x00000000016f4458 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/CEdev/bin/ez80-clang+0x16f4458)
 #8 0x0000000000e9f81c (/opt/CEdev/bin/ez80-clang+0xe9f81c)
 #9 0x0000000000ea0090 llvm::RegScavenger::scavengeRegister(llvm::TargetRegisterClass const*, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, int, bool) (/opt/CEdev/bin/ez80-clang+0xea0090)
#10 0x00000000009d403d llvm::Z80InstrInfo::rewriteFrameIndex(llvm::MachineInstr&, unsigned int, llvm::Register, long, llvm::RegScavenger*, int) const (/opt/CEdev/bin/ez80-clang+0x9d403d)
#11 0x00000000009dfd68 llvm::Z80RegisterInfo::eliminateFrameIndex(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, int, unsigned int, llvm::RegScavenger*) const (/opt/CEdev/bin/ez80-clang+0x9dfd68)
#12 0x0000000000e5ea1e (anonymous namespace)::PEI::replaceFrameIndices(llvm::MachineBasicBlock*, llvm::MachineFunction&, int&) PrologEpilogInserter.cpp:0:0
#13 0x0000000000e5d239 (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) PrologEpilogInserter.cpp:0:0
#14 0x0000000000d541fe llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/CEdev/bin/ez80-clang+0xd541fe)
#15 0x000000000110acdd llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/CEdev/bin/ez80-clang+0x110acdd)
#16 0x0000000001110953 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/CEdev/bin/ez80-clang+0x1110953)
#17 0x000000000110b31f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/CEdev/bin/ez80-clang+0x110b31f)
#18 0x00000000019f6a34 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>>) (/opt/CEdev/bin/ez80-clang+0x19f6a34)
#19 0x000000000261e16e clang::CodeGenAction::ExecuteAction() (/opt/CEdev/bin/ez80-clang+0x261e16e)
#20 0x000000000204e167 clang::FrontendAction::Execute() (/opt/CEdev/bin/ez80-clang+0x204e167)
#21 0x0000000001fc7f56 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/CEdev/bin/ez80-clang+0x1fc7f56)
#22 0x00000000020f2a8b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/CEdev/bin/ez80-clang+0x20f2a8b)
#23 0x00000000009b6298 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/CEdev/bin/ez80-clang+0x9b6298)
#24 0x00000000009b43cb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#25 0x0000000001e4f922 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_1>(long) Job.cpp:0:0
#26 0x00000000016f072d llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/CEdev/bin/ez80-clang+0x16f072d)
#27 0x0000000001e4f454 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/opt/CEdev/bin/ez80-clang+0x1e4f454)
#28 0x0000000001e14fc4 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/opt/CEdev/bin/ez80-clang+0x1e14fc4)
#29 0x0000000001e15457 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) const (/opt/CEdev/bin/ez80-clang+0x1e15457)
#30 0x0000000001e31bd8 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/CEdev/bin/ez80-clang+0x1e31bd8)
#31 0x00000000009b3ad7 main (/opt/CEdev/bin/ez80-clang+0x9b3ad7)
#32 0x00007f7084fadd0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#33 0x00000000009b10ca _start (/opt/CEdev/bin/ez80-clang+0x9b10ca)
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (https://github.com/jacobly0/llvm-project.git 005a99ce2569373524bd881207aa4a1e98a2b238)
Target: ez80
Thread model: posix
InstalledDir: /opt/CEdev/bin
clang-14: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
/opt/CEdev/meta/makefile.mk:334: recipe for target 'obj/lto.src' failed
make: *** [obj/lto.src] Error 1
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWUFv47iS_jXKhbAhUbIlHXJwnHgmgxkk6PRuA3sxKKqkcEKRWpJK4v71C5JyLDpOd9z73lzeoAexRLLqq6-KVUWRaM1aAXAZLa6ixfUFGcyjVJd3qmKaDpwYJtrZhoOSz2zoLipZ7y5v0QvRiMquZ5yJFnU7RGUNiIgatdIg8wiokZzLFzsKSkkVpasovo7iVbSMx3_usSGG8Lcp_gdiAlWEPoGo7bsb9-7lkXFARu2sSCOR7hnn6L-ub1CjZIcoJ1qjO5zZFWsihDRIU_IMogWkoGXagEIvzDzKwSAiEHSgWhB0N0rSXJoIJx7V_Z83q4cbpIeqYwYRVA0tUtBLZazqR2N6bQ3CmwhvWmYeh2pOZRfhDefP-z-zXsm_gZoIb5jWA-gIbxxDTFA-1OBYooroR2esUYRChNeoV9ArSUFrqJGWg_Kv7UqitaSMGKiRGgTSVLHezD3kB0PoE6qHrn-jOp5HcXmvZKtIh4hqhw6EscBRhDeyt8jWNzU8R3hTMRHhDXwv4hnlRLRo9oBmnTUDWTsaxmHWDqyGeqaBGibFrFfQ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