Consider the following code
declare <4 x half> @foo()
declare void @use(<4 x half>)
define void @boo() noinline optnone {
%v = call <4 x half> @foo()
call void @use(<4 x half> %v)
ret void
}
that hits UNREACHABLE when compiled with the following command
$ llc -mcpu=corei7-avx test.ll -o -
Call result #3 has unhandled type f16
UNREACHABLE executed at /root/llvm-project/llvm/lib/CodeGen/CallingConvLower.cpp:172!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -mcpu=corei7-avx <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@boo'
#0 0x0000000003a01548 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3a01548)
#1 0x00000000039fec9c SignalHandler(int) Signals.cpp:0:0
#2 0x000070ba28c42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x000070ba28c969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x000070ba28c42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x000070ba28c287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x000000000394fb3a (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x394fb3a)
#7 0x0000000002803063 llvm::CCState::AnalyzeCallResult(llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, bool (*)(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2803063)
#8 0x000000000211168f (anonymous namespace)::X86FastISel::fastLowerCall(llvm::FastISel::CallLoweringInfo&) X86FastISel.cpp:0:0
#9 0x000000000366b734 llvm::FastISel::lowerCallTo(llvm::FastISel::CallLoweringInfo&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x366b734)
#10 0x000000000366c9a2 llvm::FastISel::lowerCall(llvm::CallInst const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x366c9a2)
#11 0x00000000036724c9 llvm::FastISel::selectCall(llvm::User const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x36724c9)
#12 0x000000000366d23c llvm::FastISel::selectOperator(llvm::User const*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x366d23c)
#13 0x0000000003674661 llvm::FastISel::selectInstruction(llvm::Instruction const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3674661)
#14 0x00000000037c27e2 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x37c27e2)
#15 0x00000000037c4308 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x37c4308)
#16 0x00000000037b54ff llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x37b54ff)
#17 0x00000000029f2a59 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#18 0x0000000002fbe363 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fbe363)
#19 0x0000000002fbe5a1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fbe5a1)
#20 0x0000000002fbee05 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fbee05)
#21 0x00000000008381cc compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#22 0x000000000072e0ee main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x72e0ee)
#23 0x000070ba28c29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#24 0x000070ba28c29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#25 0x000000000082ecee _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x82ecee)
Program terminated with signal: SIGSEGV
Compiler returned: 139
Compiler explorer link: https://godbolt.org/z/8W3Psdq55
It started to crash somewhere in between LLVM 14 and 15. It looks like this was introduced by f187948
Consider the following code
that hits UNREACHABLE when compiled with the following command
Compiler explorer link: https://godbolt.org/z/8W3Psdq55
It started to crash somewhere in between LLVM 14 and 15. It looks like this was introduced by f187948