<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 - [Machinepipeliner] Bug in creating AdjacencyStructure for multiple Output dependence chains"
href="https://bugs.llvm.org/show_bug.cgi?id=45175">45175</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Machinepipeliner] Bug in creating AdjacencyStructure for multiple Output dependence chains
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lama.saba@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>The code creating a back-edge on the first and last nodes of a dependence chain
in createAdjacencyStructure:
// Add any successor to the adjacency matrix and exclude duplicates.
for (auto &SI : SUnits[i].Succs) {
// Only create a back-edge on the first and last nodes of a dependence
// chain. This records any chains and adds them later.
if (SI.getKind() == SDep::Output) {
int N = SI.getSUnit()->NodeNum;
int BackEdge = i;
auto Dep = OutputDeps.find(BackEdge);
if (Dep != OutputDeps.end()) {
BackEdge = Dep->second;
OutputDeps.erase(Dep);
}
OutputDeps[N] = BackEdge;
}
generates incorrect code for cases where there are more than one Output def in
the nodeset.
for example:
1) out1 = inst1..
2) out1 = inst2..
3) out1 = inst3..
4) out1 = inst4..
this will correctly add a back-edge from 4 to 1
but when there are 2 defs
1) out1,out2 = inst1..
2) out1,out2 = inst2..
3) out1,out2 = inst3..
4) out1,out2 = inst4..
it will add a backedge from 4 to 3, thus creating wrong recurrence node sets.
The code should generate a separate chain for each def.
unfortunately, I cou;dn't generate Hexagon/Power PC tests for this case.</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>