<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 --- - LLVM failed to fold integer comparison with non-overlapping ranges"
href="https://llvm.org/bugs/show_bug.cgi?id=24848">24848</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM failed to fold integer comparison with non-overlapping ranges
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>meloli87@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>LLVM failed to fold the following comparison:
define i32 @test(i32* %add1, i32* %add2) {
%len1 = load i32, i32* %add1, !range !1
%len2 = load i32, i32* %add2, !range !2
%cond = icmp eq i32 %len1, %len2
br i1 %cond, label %dest1, label %dest2
dest1:
ret i32 1
dest2:
ret i32 2
}
!1 = !{i32 10, i32 20}
!2 = !{i32 30, i32 40}
%len1 and %len2 are both attached with range metadata and their ranges are
non-overlapping. LLVM should be able to prove they cannot be equal to each
other and constant fold the comparison.</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>