diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-15 16:33:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-15 16:33:52 +0000 |
commit | 3b364cb9866f7fdadd9b98d4c339ee1ae91505e9 (patch) | |
tree | 91f586017399ec333c03818d1ae861cf0a5c9600 | |
parent | e90842ca523dec19ad8a27253c45061b6d0c1397 (diff) |
move PR1941 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57586 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/README.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 9831efbdf6..93e8c54979 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -971,3 +971,17 @@ int main() { //===---------------------------------------------------------------------===// +Instcombine will merge comparisons like (x >= 10) && (x < 20) by producing (x - +10) u< 10, but only when the comparisons have matching sign. + +This could be converted with a similiar technique. (PR1941) + +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 +} + +//===---------------------------------------------------------------------===// + |