<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123410>123410</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
UNREACHABLE executed at /root/llvm-project/llvm/lib/Target/X86/X86LowerAMXType.cpp:223!
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bi6c
</td>
</tr>
</table>
<pre>
Compiler Explorer: https://godbolt.org/z/558jze8xe
```console
Expect amx intrinsics
UNREACHABLE executed at /root/llvm-project/llvm/lib/Target/X86/X86LowerAMXType.cpp:223!
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-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -fno-verbose-asm -c --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -O2 <source>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '<source>'.
4. Running pass 'Lower AMX type for load/store' on function '@__tile_dpbf8ps'
#0 0x0000000003cae008 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3cae008)
#1 0x0000000003cabd14 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3cabd14)
#2 0x0000000003bf7e98 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x000078fa83a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000078fa83a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x000078fa83a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x000078fa83a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x0000000003c037fa (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3c037fa)
#8 0x00000000026c5135 ShapeCalculator::getShape(llvm::IntrinsicInst*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x26c5135)
#9 0x00000000026c58b2 (anonymous namespace)::X86LowerAMXCast::combineLdSt(llvm::SmallVectorImpl<llvm::Instruction*>&) X86LowerAMXType.cpp:0:0
#10 0x00000000026c9161 (anonymous namespace)::X86LowerAMXTypeLegacyPass::runOnFunction(llvm::Function&) (.part.0) X86LowerAMXType.cpp:0:0
#11 0x00000000035fd3bf llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x35fd3bf)
#12 0x00000000035fd771 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x35fd771)
#13 0x00000000035fe011 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x35fe011)
#14 0x0000000003f671f0 clang::emitBackendOutput(clang::CompilerInstance&, 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-assertions-trunk/bin/clang+0x3f671f0)
#15 0x000000000463a33a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x463a33a)
#16 0x0000000006664d8c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6664d8c)
#17 0x000000000463a718 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x463a718)
#18 0x0000000004900e55 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4900e55)
#19 0x00000000048837ce clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x48837ce)
#20 0x00000000049ee2ae clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x49ee2ae)
#21 0x0000000000cf3e8f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcf3e8f)
#22 0x0000000000ceb95a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#23 0x0000000004681089 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
#24 0x0000000003bf8344 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3bf8344)
#25 0x000000000468167f 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
#26 0x000000000464444d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x464444d)
#27 0x00000000046454ce clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x46454ce)
#28 0x000000000464cfd5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x464cfd5)
#29 0x0000000000cf0cc3 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcf0cc3)
#30 0x0000000000bbbfe4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xbbbfe4)
#31 0x000078fa83a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#32 0x000078fa83a29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#33 0x0000000000ceb405 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xceb405)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
Code:
```c
#include <mm_malloc.h>
#define static
#define __inline
#include <immintrin.h>
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzkmU1z2zjSgH8NfEFJRYIUSR10YBTrnUk5b1y2Zys3FQg2JYxJgAuAtjy_fgsgKX7Y8cS72lw2lcQWCDSe_kB3U6Ba84MA2KDVJ7T6fEUbc5Rqk_GIXWUyf9lsZVXzEhS-PtWlVKBQkOKjMbVGQYrIDpHdQeaZLM1SqgMiu78Q2a1WyZ9_QXIC5KUo8tq_TAotSzt0faqBGUyrE-bCKC40Zxp56R__f3edbn9LP91cYzgBawzkmBqMyE5JaRDZleVTtaiV_BNY_9H-4BkiuweqDmBHvydR-_-NfAaVfv3-8FLDktU1ClJCAkR85KW3N9fp_TXWTVZxgynOmgNWUEtlsJFzBbk5NtmSyWq055SEa92ARmSHqcgxF6xscsDmCJgpqo84o-zRKMoAkS2uFdRKMtAacqxlo9phu5JqLRmnVnHVCKyZ4rVZIi-9N5Q94ryprBbIS70l8ta3Sh4UrTBVh6YCYSyytZasLRPrXLeA3nVkx0oqDguqNSjDpdALoxrxiMgu46J_jBeH_JmqYhHixQEvpJVI69rKbUzdmKXGi0LIxROoTGpYUF3hBcOLxYGxhZGyZEfKBQo-v0tiJ2tBa32UBi8KJkupFjmnByG14azbw1lvOvyNYBRsO7MF18hLfWsLFGxBFii4xjVVGpQNHBA5lgUuuAs7Yqd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