Issue |
142531
|
Summary |
[llc] Assertion `!I.hasOperandBundlesOtherThan(...) && "Cannot lower calls with arbitrary operand bundles!"' failed.
|
Labels |
new issue
|
Assignees |
|
Reporter |
shao-hua-li
|
I triggered a `llc` assertion error on the following code
```llvm
source_filename = "operandbundle.ll"
define internal void @f(i32 %arg) {
entry:
call void @g() [ "foo"(i32 %arg) ]
ret void
}
declare void @g()
```
Compiler explorer: https://godbolt.org/z/dqeETPraW
Steps to reproduce
```console
% llc test.ll -mtriple=x86_64
llc: /root/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9548: void llvm::SelectionDAGBuilder::visitCall(const llvm::CallInst&): Assertion `!I.hasOperandBundlesOtherThan( {LLVMContext::OB_deopt, LLVMContext::OB_funclet, LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated, LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi, LLVMContext::OB_convergencectrl}) && "Cannot lower calls with arbitrary operand bundles!"' 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 -mtriple=wasm64 <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'WebAssembly Instruction Selection' on function '@f'
#0 0x0000000003f00448 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3f00448)
#1 0x0000000003efddd4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007256fcc42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007256fcc969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007256fcc42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007256fcc287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007256fcc2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007256fcc39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x0000000003c0120f llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3c0120f)
#9 0x0000000003c1464f llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3c1464f)
#10 0x0000000003ca382d llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, bool&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ca382d)
#11 0x0000000003ca46f5 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ca46f5)
#12 0x0000000003ca5a05 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ca5a05)
#13 0x0000000003c962cf llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3c962cf)
#14 0x0000000002e492ba llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#15 0x00000000034756df llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x34756df)
#16 0x0000000003475a91 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3475a91)
#17 0x0000000003476331 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3476331)
#18 0x00000000008c33a8 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#19 0x00000000007a140e main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7a140e)
#20 0x00007256fcc29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#21 0x00007256fcc29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#22 0x00000000008b9a85 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8b9a85)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs