<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 --- - ARMLoadStoreOptimizer: MemOps selected incorrectly"
href="http://llvm.org/bugs/show_bug.cgi?id=17136">17136</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ARMLoadStoreOptimizer: MemOps selected incorrectly
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>weimingz@codeaurora.org
</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>I debugged a mis-scheduled code and found that it was caused by
ARMLoadStoreOptimizer.
In ARMPreAllocLoadStoreOpt::RescheduleOps():
The loop below is supposed to insert NumMove number of ops into MemOps and
MemRegs from top of Ops but now it's inserting
for (int i = NumMove-1; i >= 0; --i) {
MemOps.insert(Ops[i]);
MemRegs.insert(Ops[i]->getOperand(0).getReg());
}
It should be
for (int i = NumMove-1; i >= 0; --i) {
MemOps.insert(Ops[Ops.size() - 1 - i]);
MemRegs.insert(Ops[Ops.size() - 1 - i]->getOperand(0).getReg());
}</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>