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

    <tr>
        <th>Summary</th>
        <td>
            error in backend: failed to perform tail call elimination on a call site marked musttail
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          hiraditya
      </td>
    </tr>
</table>

<pre>
    crash log:
```
fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
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/compiler-explorer/clang-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -S -target arm-linux-gnueabi --gcc-toolchain=/opt/compiler-explorer/arm/gcc-12.2.0/arm-unknown-linux-gnueabi --sysroot=/opt/compiler-explorer/arm/gcc-12.2.0/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot -fcolor-diagnostics -fno-crash-diagnostics -std=c++20 -fstack-protector-strong -Oz --target=armv7a-linux-androideabi24 -fno-strict-aliasing -fno-exceptions -fno-rtti -mthumb -O3 -D NDEBUG -std=c++20 -fPIC -fvisibility=hidden -ffp-contract=off -fno-slp-vectorize <source>
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '<source>'.
4.      Running pass 'ARM Instruction Selection' on function '@_ZN3JSC12JSRopeString15resolveToBufferIhEEvPNS_8JSStringES3_S3_PT_jPh'
 #0 0x00000000034bd4a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x34bd4a8)
 #1 0x00000000034bb5f4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x34bb5f4)
 #2 0x0000000003409cf3 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3409cf3)
 #3 0x00000000034b2ffe llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x34b2ffe)
 #4 0x0000000000c09946 (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc09946)
 #5 0x0000000003412d23 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3412d23)
 #6 0x0000000003412e88 (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3412e88)
 #7 0x000000000153b8de llvm::ARMTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x153b8de)
 #8 0x00000000044c6eda llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x44c6eda)
 #9 0x00000000044c8cb4 llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x44c8cb4)
#10 0x00000000044e0dfa llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x44e0dfa)
#11 0x00000000044f6569 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x44f6569)
#12 0x000000000450c58b llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x450c58b)
#13 0x0000000004584bd6 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true>, false, true>, bool&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4584bd6)
#14 0x0000000004585fc9 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4585fc9)
#15 0x00000000045887a9 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#16 0x00000000014d0944 (anonymous namespace)::ARMDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ARMISelDAGToDAG.cpp:0:0
#17 0x0000000002976f30 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#18 0x0000000002e94f52 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x2e94f52)
#19 0x0000000002e950d1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x2e950d1)
#20 0x0000000002e96d50 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x2e96d50)
#21 0x0000000003729b79 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3729b79)
#22 0x0000000003cf74f8 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3cf74f8)
#23 0x0000000005af9399 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5af9399)
#24 0x0000000003cf6705 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3cf6705)
#25 0x0000000003f75df1 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3f75df1)
#26 0x0000000003ef3e1b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3ef3e1b)
#27 0x00000000040550e3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x40550e3)
#28 0x0000000000c0b6b6 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc0b6b6)
#29 0x0000000000c0410d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x0000000003d3dd19 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#31 0x0000000003409bf3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3409bf3)
#32 0x0000000003d3df39 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#33 0x0000000003d05f37 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3d05f37)
#34 0x0000000003d068ed clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3d068ed)
#35 0x0000000003d1065c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3d1065c)
#36 0x0000000000c08ab1 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc08ab1)
#37 0x0000000000b031f1 main (/opt/compiler-explorer/clang-trunk/bin/clang+++0xb031f1)
#38 0x00007f656dd9c083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#39 0x0000000000c0390e _start (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc0390e)
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWl1v47bS_jXKDaFA35YvcuHYyTaL3W4Qp714bwyKHNlsKFIvSTlJf_0BJdkWFSe7bbXFAU7RRWR-DJ95ZsgZjoS1ZlsBcOWl1166usCN2Ul1tWMKU2Ze8UUh6esVUVjvEJdbL154wcoLFl4W9P-3P0tsMEeglFRevOgeEBOowOQJBLVtJWYcKDIS1aBKqSpkMOOIYM4RcFYxgQ2TAkmBcNeqmQFUYfUEFFWNNnZ8t9z9l5vF-gbppqiYQRgVzRYpqKUyVv7OmFpbpNGtF91umdk1xSWRlRfdcr4__PFrJf8AYrzolmndgPaiW4QFRUwQ3lBAZgeoU9xqYRQm4EVLVCuolSSgNVCkZaO6ZjsTay0JwwYoUo1AmihWm8sO8tpg8oRoU9VHDoNLL5jfK7lVuEJYbZsKhLHAkRfdytoiI7KqGQflw0vNpQJl2zgWW9-oRjx50W3BxKHNi6696Br5W_qMVeknyN8iX1phuK6tyMbUjbnUyF8j32C1BYOwqnzORPPib0UDuGDI97eE-EZKTnaYCS9efYgGK0uonRJGl9Fl0DX5jXgS8lm8ka1ftZLSTCn1O339isgvieRS-ZThrZDaMKKRXwrptzZ2m7WhXrwiHaFRgPxSW_NZlzFAjFS-NkqKLfK__Yn8nksvXmFV7We4h4AFVZJRCyNKuqW0UYwYH3OGNbPTbSO8EKit6_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