<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 --- - Missed optimisation opportunity in boolean function taking i32 values"
href="http://llvm.org/bugs/show_bug.cgi?id=19852">19852</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Missed optimisation opportunity in boolean function taking i32 values
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</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>opt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>expipiplus1@gmail.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=12563" name="attach_12563" title="example functionk">attachment 12563</a> <a href="attachment.cgi?id=12563&action=edit" title="example functionk">[details]</a></span>
example functionk
The attached function takes two i32 values in the range [0,1] and compares
equality.
opt -O3 doesn't change the body of the function to an icmp and zext. It instead
creates the following:
define i32 @sameBool_r8(i32, i32) #0 {
entry2:
%cond = icmp eq i32 %0, 1
%2 = icmp eq i32 %1, 0
%3 = icmp eq i32 %1, 1
%.sink = select i1 %cond, i1 %3, i1 %2
%4 = zext i1 %.sink to i32
ret i32 %4
}</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>