<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 collapsing simple switch BBs"
href="http://llvm.org/bugs/show_bug.cgi?id=19853">19853</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Missed optimisation opportunity in collapsing simple switch BBs
</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=12564" name="attach_12564" title="Function comparing two i32s in a limited range.">attachment 12564</a> <a href="attachment.cgi?id=12564&action=edit" title="Function comparing two i32s in a limited range.">[details]</a></span>
Function comparing two i32s in a limited range.
The attached function takes two i32 values (%0 and %1) in the range [0,6] and
compares equality by switching on the value of %0. In the switched to basic
block %1 is compared to a constant which is equal to %0.
The branches to a phi and ret block could be replaced with ret instructions.
The blocks are also identical when replacing the constant with the value of %0,
and could be merged.
The function could be reduced to an icmp and a zext, instead it retains the
switch to a specialised block structure.</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>