OSDN Git Service

New testcases
authorChris Lattner <sabre@nondot.org>
Tue, 12 Aug 2003 19:10:50 +0000 (19:10 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Aug 2003 19:10:50 +0000 (19:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7781 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/or.ll

index 43ed83d..4165c52 100644 (file)
@@ -100,3 +100,16 @@ bool %test15(uint %A, uint %B) {
         ret bool %D
 }
 
+int %test16(int %A) {
+       %B = and int %A, 1
+       %C = and int %A, -2       ; -2 = ~1
+       %D = or int %B, %C        ; %D = and int %B, -1 == %B
+       ret int %D
+}
+
+int %test17(int %A) {
+       %B = and int %A, 1
+       %C = and int %A, 4
+       %D = or int %B, %C        ; %D = and int %B, 5
+       ret int %D
+}