move PR1941 here.
authorChris Lattner <sabre@nondot.org>
Wed, 15 Oct 2008 16:33:52 +0000 (16:33 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 15 Oct 2008 16:33:52 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57586 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 9831efbdf64d247bb8a0cdb348d0f95ac784171a..93e8c54979d3a898a8a164bfa86436cc7433fc54 100644 (file)
@@ -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
+}
+
+//===---------------------------------------------------------------------===//
+