diff options
author | Chris Lattner <sabre@nondot.org> | 2003-07-23 18:28:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-07-23 18:28:42 +0000 |
commit | 31a7f85346d4a379ea4dfad068df6193e3300e30 (patch) | |
tree | 7caa0abdb0214c3975ecc662d976b7c0eb809b54 /test | |
parent | c6a8aff3f617f351ed16aaa37580b1284b52e57a (diff) | |
download | external_llvm-31a7f85346d4a379ea4dfad068df6193e3300e30.zip external_llvm-31a7f85346d4a379ea4dfad068df6193e3300e30.tar.gz external_llvm-31a7f85346d4a379ea4dfad068df6193e3300e30.tar.bz2 |
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/and.ll | 2 | ||||
-rw-r--r-- | test/Transforms/InstCombine/or.ll | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll index e0c4d18..8e33a7d 100644 --- a/test/Transforms/InstCombine/and.ll +++ b/test/Transforms/InstCombine/and.ll @@ -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 } diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index 0ffc8e1..529e43c 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -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 +} |