<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 --- - Early CSE and GVN miss an assume optimization when the value isn't used directly"
href="https://llvm.org/bugs/show_bug.cgi?id=28086">28086</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Early CSE and GVN miss an assume optimization when the value isn't used directly
</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>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>josh.klontz@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>Created <span class=""><a href="attachment.cgi?id=16515" name="attach_16515" title="Minimum reproducing example">attachment 16515</a> <a href="attachment.cgi?id=16515&action=edit" title="Minimum reproducing example">[details]</a></span>
Minimum reproducing example
See <a href="https://groups.google.com/forum/#!topic/llvm-dev/90lQByG6teg">https://groups.google.com/forum/#!topic/llvm-dev/90lQByG6teg</a> for the
conversation.
Here's a minimum reproducing example:
define i32 @foo(i32*) {
entry:
%1 = load i32, i32* %0
%2 = icmp eq i32 %1, 3
call void @llvm.assume(i1 %2)
%3 = load i32, i32* %0
ret i32 %3
}
Both -early-cse and -gvn independently simplify this IR to:
define i32 @foo(i32*) {
entry:
%1 = load i32, i32* %0
ret i32 %1
}
Instead of:
define i32 @foo(i32*) {
entry:
ret i32 3
}</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>