Closed
Description
Source code:
target triple = "x86_64-unknown-linux-gnu"
define half @test_half_powi(half %self, i32 %n) {
start:
%v = call half @llvm.powi.f16.i32(half %self, i32 %n)
ret half %v
}
Crash (assertions required):
llc: /root/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4708: void {anonymous}::SelectionDAGLegalize::ConvertNodeToLibcall(llvm::SDNode*): Assertion `LC != RTLIB::UNKNOWN_LIBCALL && "Unexpected fpowi."' failed.
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 <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test_half_powi'
#0 0x0000000003ae7028 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ae7028)
#1 0x0000000003ae479c SignalHandler(int) Signals.cpp:0:0
#2 0x00007b9927e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007b9927e969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007b9927e42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007b9927e287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007b9927e2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007b9927e39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x000000000376d745 (anonymous namespace)::SelectionDAGLegalize::ConvertNodeToLibcall(llvm::SDNode*) LegalizeDAG.cpp:0:0
#9 0x000000000377f1a6 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) (.part.0) LegalizeDAG.cpp:0:0
#10 0x0000000003782883 llvm::SelectionDAG::Legalize() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3782883)
#11 0x0000000003899fb7 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3899fb7)
#12 0x000000000389d1fa llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x389d1fa)
#13 0x000000000389e550 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x389e550)
#14 0x000000000388f3ef llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x388f3ef)
#15 0x0000000002a848e9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#16 0x0000000003073ded llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3073ded)
#17 0x0000000003074181 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3074181)
#18 0x000000000307347c llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x307347c)
#19 0x000000000084693c compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#20 0x0000000000737a66 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x737a66)
#21 0x00007b9927e29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#22 0x00007b9927e29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#23 0x000000000083d92e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x83d92e)
Program terminated with signal: SIGSEGV
Compiler returned: 139