<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - SelectionDAG assertion failure: N->getNumOperands() == 2"
href="https://bugs.llvm.org/show_bug.cgi?id=38185">38185</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SelectionDAG assertion failure: N->getNumOperands() == 2
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mascasa@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20561" name="attach_20561" title="Reproducer">attachment 20561</a> <a href="attachment.cgi?id=20561&action=edit" title="Reproducer">[details]</a></span>
Reproducer
Reproducer:
$ llc 9187.ll
llc:
/usr/local/google/home/eneyman/llvm_mono/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6876:
llvm::SDNode *llvm::SelectionDAG::UpdateNodeOperands(llvm::SDNode *,
llvm::SDValue, llvm::SDValue): Assertion `N->getNumOperands() == 2 && "Update
with wrong number of operands"' failed.
0. Program arguments: build/bin/llc 9187.ll
1. Running pass 'Function Pass Manager' on module '9187.ll'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo'
#0 0x0000000000ce50c1 __interceptor_backtrace.part.121
llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:3981:0
#1 0x00000000056d0f6b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
llvm/lib/Support/Unix/Signals.inc:490:13
#2 0x00000000056ce3a3 llvm::sys::RunSignalHandlers()
llvm/lib/Support/Signals.cpp:68:18
#3 0x00000000056d1c56 SignalHandler(int)
llvm/lib/Support/Unix/Signals.inc:343:3
#4 0x00007f30642e80c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#5 0x00007f3062e79fcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#6 0x00007f3062e7b3fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#7 0x00007f3062e72e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#8 0x00007f3062e72ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#9 0x00000000052da22c llvm::SelectionDAG::UpdateNodeOperands(llvm::SDNode*,
llvm::SDValue, llvm::SDValue)
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6883:9
#10 0x000000000501bcc7 (anonymous
namespace)::DAGCombiner::BackwardsPropagateMask(llvm::SDNode*,
llvm::SelectionDAG&) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4102:5
#11 0x0000000004f9ef6d (anonymous
namespace)::DAGCombiner::visitAND(llvm::SDNode*)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4350:9
#12 0x0000000004f7dfd0 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1526:40
#13 0x0000000004f7c188 (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1603:16
#14 0x0000000004f7aa0d (anonymous
namespace)::DAGCombiner::Run(llvm::CombineLevel)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1452:18
#15 0x0000000004f797f1 llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*, llvm::CodeGenOpt::Level)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18251:3
#16 0x000000000533adfe llvm::SelectionDAGISel::CodeGenAndEmitDAG()
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:872:3
#17 0x0000000005338ca5
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:669:1
#18 0x000000000533802d
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1738:11
#19 0x0000000005332ebf
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:471:7
#20 0x0000000002bf2c6e (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:177:7
#21 0x0000000003c43056
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
llvm/lib/CodeGen/MachineFunctionPass.cpp:62:13
#22 0x00000000045f2c57 llvm::FPPassManager::runOnFunction(llvm::Function&)
llvm/lib/IR/LegacyPassManager.cpp:1585:27
#23 0x00000000045f30c6 llvm::FPPassManager::runOnModule(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:1607:16
#24 0x00000000045f3d21 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:1664:27
#25 0x00000000045f3568 llvm::legacy::PassManagerImpl::run(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:1768:13
#26 0x0000000000d6ab0a compileModule(char**, llvm::LLVMContext&)
llvm/tools/llc/llc.cpp:592:49
#27 0x0000000000d68a97 main llvm/tools/llc/llc.cpp:349:22
#28 0x00007f3062e672b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#29 0x0000000000c5ad1a _start (build/bin/llc+0xc5ad1a)
Aborted</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>