- Notifications
You must be signed in to change notification settings - Fork15.3k
Description
Attempting to compiler the following IR causes LLVM to crash (compiler explorer):
targettriple ="mips64el-unknown-linux-gnuabi64"definefp128@foo() {call {i8,i128 }@bar()retfp128 0xL00000000000000000000000000000000}define {i8,i128 }@bar() {ret {i8,i128 }zeroinitializer}
Crash backtrace:
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-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>1.Running pass 'Function Pass Manager' on module '<source>'.2.Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function '@foo' #0 0x0000000003739428 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3739428) #1 0x0000000003736dac SignalHandler(int) Signals.cpp:0:0 #2 0x0000718fcb642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #3 0x00000000034c3bb3 llvm::SelectionDAG::FoldConstantArithmetic(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::ArrayRef<llvm::SDValue>, llvm::SDNodeFlags) (/opt/compiler-explorer/clang-trunk/bin/llc+0x34c3bb3) #4 0x00000000034c79f4 llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags) (/opt/compiler-explorer/clang-trunk/bin/llc+0x34c79f4) #5 0x0000000003430a84 getCopyFromParts(llvm::SelectionDAG&, llvm::SDLoc const&, llvm::SDValue const*, unsigned int, llvm::MVT, llvm::EVT, llvm::Value const*, llvm::SDValue, std::optional<unsigned int>, std::optional<llvm::ISD::NodeType>) (.isra.0) SelectionDAGBuilder.cpp:0:0 #6 0x000000000343fb56 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const (/opt/compiler-explorer/clang-trunk/bin/llc+0x343fb56) #7 0x000000000344172d llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x344172d) #8 0x0000000003462354 llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*, llvm::TargetLowering::PtrAuthInfo const*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3462354) #9 0x0000000003478998 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3478998)#10 0x000000000348d487 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x348d487)#11 0x0000000003505a53 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, true>, bool&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3505a53)#12 0x0000000003507124 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3507124)#13 0x0000000003508f94 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3508f94)#14 0x00000000015c3c1b llvm::MipsDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x15c3c1b)#15 0x00000000034f8ac1 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x34f8ac1)#16 0x000000000283368b llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0#17 0x0000000002d72152 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2d72152)#18 0x0000000002d722d1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2d722d1)#19 0x0000000002d73f80 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2d73f80)#20 0x0000000000846ed4 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0#21 0x000000000073ece6 main (/opt/compiler-explorer/clang-trunk/bin/llc+0x73ece6)#22 0x0000718fcb629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)#23 0x0000718fcb629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)#24 0x000000000083eb0e _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x83eb0e)