[llvm-bugs] [Bug 24848] New: LLVM failed to fold integer comparison with non-overlapping ranges
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 16 12:13:05 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24848
Bug ID: 24848
Summary: LLVM failed to fold integer comparison with
non-overlapping ranges
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: meloli87 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150916/69b8e773/attachment.html>
More information about the llvm-bugs
mailing list