<html>
<head>
<base href="https://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 --- - Incorrect liveness in DeadStoreElimination"
href="https://llvm.org/bugs/show_bug.cgi?id=25422">25422</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect liveness in DeadStoreElimination
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dan433584@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>In this code:
declare void @foo()
@g = external global i8
define void @f() {
store i8 1, i8* @g
call void @foo() readnone
store i8 0, i8* @g
ret void
}
Dead-store elimination eliminates the first store, however this is incorrect if
the call to @foo can unwind, such that callers of @f can observe the value of
@g after the first store and before the second, even if @foo itself can't.
MemoryDependenceAnalysis currently says that the second store here has a direct
local dependence on the first store. There's a sense in which that is a correct
answer, but DeadStoreElimination inteprets this answer to mean that the first
store is dead. It's not immediately obvious which of these two should be fixed.
This is a reduced form of the issue reported in Rust here:
<a href="https://github.com/rust-lang/rust/issues/29485">https://github.com/rust-lang/rust/issues/29485</a></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>