[LLVMbugs] [Bug 1941] New: instcombine doesn't merge mixed sign-unsign comparisons
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Jan 21 23:01:40 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=1941
Summary: instcombine doesn't merge mixed sign-unsign comparisons
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu
Instcombine will merge comparisons like (x >= 10) && (x < 20) by producing (x -
10) u< 10, but only when the comparisons have matching sign.
This program:
define i1 @test(i8 %x) {
%A = icmp uge i8 %x, 5
%B = icmp slt i8 %x, 20
%C = and i1 %A, %B
ret i1 %C
}
could be converted using the same technique. There's a lot of corner cases here
that would need to be thought through thoroughly.
(This was found by inspection, I doubt if any llvm-gcc generated input would
trigger this.)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list