<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - LegalizeTypes.cpp:618: void llvm::DAGTypeLegalizer::RemapValue(llvm::SDValue&): Assertion `N.getNode()->getNodeId() != NewNode && "Mapped to new node!"' failed."
href="http://llvm.org/bugs/show_bug.cgi?id=16562">16562</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LegalizeTypes.cpp:618: void llvm::DAGTypeLegalizer::RemapValue(llvm::SDValue&): Assertion `N.getNode()->getNodeId() != NewNode && "Mapped to new node!"' failed.
</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>normal
</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>hfinkel@anl.gov
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10829" name="attach_10829" title="bugpoint reduced test case">attachment 10829</a> <a href="attachment.cgi?id=10829&action=edit" title="bugpoint reduced test case">[details]</a></span>
bugpoint reduced test case
If you run the attached test case with:
llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7
then this crashes:
Scalarize node result 0: 0x123b0dc0: v1i64 = extract_subvector 0x12392bc0,
0x1239d790 [ORD=7] [ID=0]
Scalarize node operand 0: 0x123ad790: i64 = extract_vector_elt 0x123b0dc0,
0x123929c0 [ORD=7] [ID=0]
llc: /llvm-trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:618: void
llvm::DAGTypeLegalizer::RemapValue(llvm::SDValue&): Assertion
`N.getNode()->getNodeId() != NewNode && "Mapped to new node!"' failed.
This seems similar to <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - DAGTypeLegalizer::PerformExpensiveChecks(): Assertion `NewVal.getNode()->getNodeId() != NewNode && "ReplacedValues maps to a new node!"' failed."
href="show_bug.cgi?id=8923">http://llvm.org/bugs/show_bug.cgi?id=8923</a> (which Nadav
fixed a couple of years ago).
Also, this might just be a symptom of a more-general problem that I've noticed
before: we currently cannot replace a node with one of its operands.
(gdb) call Res.getNode()->dump()
0x123929c0: i64 = Constant<0> [ID=-3]
(gdb) call N->dump()
0x123ad790: i64 = extract_vector_elt 0x123b0dc0, 0x123929c0 [ORD=7] [ID=0]
(gdb) call N->getOperand(0).getNode()->dump()
0x123b0dc0: v1i64 = extract_subvector 0x12392bc0, 0x1239d790 [ORD=7] [ID=-3]
(gdb) call N->getOperand(1).getNode()->dump()
0x123929c0: i64 = Constant<0> [ID=-3]
(so the result is the constant 0 and so is one of the original operands)</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>