<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 --- - [EarlyCSE, Missed Opt] Prefer to remove later store where possible"
href="http://llvm.org/bugs/show_bug.cgi?id=20804">20804</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[EarlyCSE, Missed Opt] Prefer to remove later store where possible
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>listmail@philipreames.com
</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=12954" name="attach_12954" title="Failing test case for missed optimization">attachment 12954</a> <a href="attachment.cgi?id=12954&action=edit" title="Failing test case for missed optimization">[details]</a></span>
Failing test case for missed optimization
In EarlyCSE, we perform a simple dead store elimination step. If we encounter
a clobbering store after having already seen a store to the same location, we
can remove the first store. This is correct, but it would be better to remove
the later store where possible. This would avoid the need to advance the
generation number and would enable value forwarding across the second store.
We can only do this if a) the later store doesn't alias any of the current
generations loads, and b) the two stores store the same value.
I've attached a simple test case that shows the desired optimization.</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>