New testcases
authorChris Lattner <sabre@nondot.org>
Wed, 23 Jul 2003 18:28:42 +0000 (18:28 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 23 Jul 2003 18:28:42 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7263 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/and.ll
test/Transforms/InstCombine/or.ll

index e0c4d180e18c17101469f32a41feeaecb7f54a98..8e33a7dda5a45697d1b6d79758996b24ee13de73 100644 (file)
@@ -62,6 +62,6 @@ bool %test9(uint %A) {
 uint %test10(uint %A) {
        %B = and uint %A, 12
        %C = xor uint %B, 15
-       %D = and uint %C, 1
+       %D = and uint %C, 1   ; (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
        ret uint %D
 }
index 0ffc8e1870d275494c08d9c921e2d60ba20c8bee..529e43ced98fe94f08ae978d2c7da471ad5423f4 100644 (file)
@@ -129,3 +129,17 @@ bool %test20(int %A) {
        ret bool %G
 }
 
+ubyte %test21(ubyte %A) {
+       %B = or ubyte %A, 1
+       %C = and ubyte %B, 254
+       %D = or ubyte %C, 254  ; (X & C1) | C2 --> (X | C2) & (C1|C2)
+       ret ubyte %D
+}
+
+ubyte %test22(ubyte %A) {
+       %B = or ubyte %A, 254
+       %C = xor ubyte %B, 13
+       %D = or ubyte %C, 1    ; (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)
+       %E = xor ubyte %D, 12
+       ret ubyte %E
+}