<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56739>56739</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ARM: fatal error: error in backend: Cannot select: 0x56462519db48: ch = cleanupret 0x5646272086f8
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
darktohka
</td>
</tr>
</table>
<pre>
I am trying to build OpenAL-Soft (https://github.com/kcat/openal-soft) with the MSVC toolchain, target: arm-pc-windows-msvc
```
clang version 15.0.0 (/home/user/.cache/yay/llvm-git/llvm-project b43bec19b975c7d1598dac67c12994a6365f2013)
Target: arm-pc-windows-msvc
Thread model: posix
InstalledDir: /usr/bin
```
When it compiles `auxeffectslot.cpp`, the ARM code generator crashes. It is working fine on ARM64.
Full stacktrace:
```
fatal error: error in backend: Cannot select: 0x56462519db48: ch = cleanupret 0x5646272086f8
In function: alGenAuxiliaryEffectSlots
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: /usr/bin/clang++ --target=arm-pc-windows-msvc -O3 -fstack-protector-strong -fomit-frame-pointer -Wformat -Wformat-security -fuse-ld=lld -Wno-old-style-cast -Wno-language-extension-token -Wno-microsoft-anon-tag -Wno-pragma-pack -Wno-macro-redefined -Wno-ignored-attributes -Wno-ignored-pragma-intrinsic -march=armv7-a -O3 -Xclang --dependent-lib=msvcrt -Winline -Wunused -Wall -Wextra -Wshadow -Wconversion -Wcast-align -Wpedantic -Wold-style-cast -Wnon-virtual-dtor -Woverloaded-virtual -fno-math-errno -std=gnu++14 -DALC_API= -DAL_ALEXT_PROTOTYPES -DAL_API= -DAL_BUILD_LIBRARY -DAL_LIBTYPE_STATIC -DNOMINMAX -DRESTRICT=__restrict -D_WIN32 -I/home/user/Desktop/nirai-android-openssl/openal/include -I/home/user/Desktop/nirai-android-openssl/openal -I/home/user/Desktop/nirai-android-openssl/openal/common -D_FORTIFY_SOURCE=2 -DNDEBUG -DdNODEBUG -DAL_LIBTYPE_STATIC -DLINK_ALL_STATIC -D_CRT_SECURE_NO_WARNINGS -I /home/user/Desktop/nirai-android-openssl/toolchains/windows-armeabi-v7a/include -D_CRT_SECURE_NO_WARNINGS -I /home/user/Desktop/nirai-android-openssl/toolchains/windows-armeabi-v7a/include -DNDEBUG -D_DLL -D_MT -c -MD -MT CMakeFiles/OpenAL.dir/al/auxeffectslot.cpp.obj -MF CMakeFiles/OpenAL.dir/al/auxeffectslot.cpp.obj.d -fcolor-diagnostics -o CMakeFiles/OpenAL.dir/al/auxeffectslot.cpp.obj /home/user/Desktop/nirai-android-openssl/openal/al/auxeffectslot.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/home/user/Desktop/nirai-android-openssl/openal/al/auxeffectslot.cpp'.
4. Running pass 'ARM Instruction Selection' on function '@alGenAuxiliaryEffectSlots'
#0 0x00007f3f41eaac8a (/usr/bin/../lib/libLLVM-15.so+0xe0ac8a)
#1 0x00007f3f41ea82cf llvm::sys::RunSignalHandlers() (/usr/bin/../lib/libLLVM-15.so+0xe082cf)
#2 0x00007f3f41d8adbf llvm::CrashRecoveryContext::HandleExit(int) (/usr/bin/../lib/libLLVM-15.so+0xceadbf)
#3 0x00007f3f41ea2184 llvm::sys::Process::Exit(int, bool) (/usr/bin/../lib/libLLVM-15.so+0xe02184)
#4 0x000056462476deeb (/usr/bin/clang+++0x12eeb)
#5 0x00007f3f41da3e52 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-15.so+0xd03e52)
#6 0x00007f3f428bf743 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/usr/bin/../lib/libLLVM-15.so+0x181f743)
#7 0x00007f3f428c25ba llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/usr/bin/../lib/libLLVM-15.so+0x18225ba)
#8 0x00007f3f44a1dd88 (/usr/bin/../lib/libLLVM-15.so+0x397dd88)
#9 0x00007f3f428bc92e llvm::SelectionDAGISel::DoInstructionSelection() (/usr/bin/../lib/libLLVM-15.so+0x181c92e)
#10 0x00007f3f428c700c llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/bin/../lib/libLLVM-15.so+0x182700c)
#11 0x00007f3f428c9f79 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/bin/../lib/libLLVM-15.so+0x1829f79)
#12 0x00007f3f428cc412 (/usr/bin/../lib/libLLVM-15.so+0x182c412)
#13 0x00007f3f44a23e59 (/usr/bin/../lib/libLLVM-15.so+0x3983e59)
#14 0x00007f3f42314c6e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/../lib/libLLVM-15.so+0x1274c6e)
#15 0x00007f3f42021950 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/../lib/libLLVM-15.so+0xf81950)
#16 0x00007f3f42021a94 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/../lib/libLLVM-15.so+0xf81a94)
#17 0x00007f3f420223fb llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/../lib/libLLVM-15.so+0xf823fb)
#18 0x00007f3f4a9a9b5d 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>>) (/usr/bin/../lib/libclang-cpp.so.15+0x1b6fb5d)
#19 0x00007f3f4adb1240 (/usr/bin/../lib/libclang-cpp.so.15+0x1f77240)
#20 0x00007f3f498c3c31 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.15+0xa89c31)
#21 0x00007f3f4b689939 clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.15+0x284f939)
#22 0x00007f3f4b609dcc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.15+0x27cfdcc)
#23 0x00007f3f4b70e24f clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.15+0x28d424f)
#24 0x000056462476f1e0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0x141e0)
#25 0x0000564624768837 (/usr/bin/clang+++0xd837)
#26 0x00007f3f4b286669 (/usr/bin/../lib/libclang-cpp.so.15+0x244c669)
#27 0x00007f3f41d8ac57 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/bin/../lib/libLLVM-15.so+0xceac57)
#28 0x00007f3f4b286aaf (/usr/bin/../lib/libclang-cpp.so.15+0x244caaf)
#29 0x00007f3f4b250438 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/bin/../lib/libclang-cpp.so.15+0x2416438)
#30 0x00007f3f4b250edd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/bin/../lib/libclang-cpp.so.15+0x2416edd)
#31 0x00007f3f4b25f62d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/bin/../lib/libclang-cpp.so.15+0x242562d)
#32 0x000056462476d345 clang_main(int, char**) (/usr/bin/clang+++0x12345)
#33 0x00007f3f40c86290 (/usr/bin/../lib/libc.so.6+0x29290)
#34 0x00007f3f40c8634a __libc_start_main (/usr/bin/../lib/libc.so.6+0x2934a)
#35 0x00005646247679a5 _start (/usr/bin/clang+++0xc9a5)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (/home/user/.cache/yay/llvm-git/llvm-project b43bec19b975c7d1598dac67c12994a6365f2013)
Target: arm-pc-windows-msvc
Thread model: posix
InstalledDir: /usr/bin
clang-15: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/auxeffectslot-6d130b.cpp
clang-15: note: diagnostic msg: /tmp/auxeffectslot-6d130b.sh
clang-15: note: diagnostic msg:
********************
```
Preprocessed CPP: https://transfer.sh/get/tjpl6b/auxeffectslot-6d130b.cpp
Preprocessed SH: https://transfer.sh/get/3NKJpw/auxeffectslot-6d130b.sh
Issue is prevalent on both Clang 14.0.6 and Clang 15.0.0git.
Thank you in advance for any help!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdWtty4rgW_RryojLlG7485IEA6WaGhBTQk-knSpZl8MRYPrKchL8_e9tALEImNN0zp-pQFNi6bC0t7ZssRyLeXo8J3RAlt2m-IkqQqEqzmEwLnvcnxlwkinTsYK1UUXacfse-he8qVesq6jKxgZsnRhX8CehAM6OEDh07JC_QhKg1J3fzPwYgVmRsTdO8Y8MNlSuuQBihcmMUzHhJ81i8lMamfGYdc9gx-7tfz9x961uWUUD4zGWZipxYva7ZNREbDL4WGw5_Vckl_HUZZWu839It_GbZ88YAyPvLQoq_OFMkcp2IMyuMQr_H_NjqhUFMmeczyw5Dl3qO10ts03JgOg2AxefAF2vJaUw2IuYZNixEmb42VeO8VDTLeDxMJVbVeBFuBLScmm_z-7jmOUkVAbKLNOMlgXpavfIkgTmUmVBdVhTYB5kFvvuzO2gbc7LiOZdUCUmYpOWal10yViQtyYuQT7jWSZpzAkxCD8_ttse8rbKMAFr2pCRlHNf942VJKEyLcClFPa36gqQ5iaA7z2MsG9A8F4qUPAPMWGC-9jzXs3tWGEdugCVsTTrOkLCM07wqJFf7Nr5tBl4S7DkkSZUzBQpQL0P2BbS0ek2zlMrtqKZkDpSUTeuHyag_H5GyijZAIAXNXhHJCyEV6vnfqDSqyZG2wG1alh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