|
|
| Bugzilla Link |
1941 |
| Resolution |
LATER |
| Resolved on |
Oct 15, 2008 11:33 |
| Version |
trunk |
| OS |
All |
Extended Description
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.)