diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll index 7dd3d554b65..03b67f57b6e 100644 --- a/test/Transforms/InstCombine/and.ll +++ b/test/Transforms/InstCombine/and.ll @@ -42,4 +42,10 @@ int %test7(int %A) { ; A & ~A == 0 %NotA = xor int %A, -1 %B = and int %A, %NotA ret int %B -} \ No newline at end of file +} + +ubyte %test8(ubyte %A) { ; AND associates + %B = and ubyte %A, 3 + %C = and ubyte %B, 4 + ret ubyte %C +} diff --git a/test/Transforms/InstCombine/mul.ll b/test/Transforms/InstCombine/mul.ll index a0a28081067..962f599892f 100644 --- a/test/Transforms/InstCombine/mul.ll +++ b/test/Transforms/InstCombine/mul.ll @@ -32,3 +32,9 @@ int %test5(int %A) { %B = mul int %A, 8 ret int %B } + +int %test6(ubyte %A) { + %B = mul ubyte %A, 8 + %C = mul ubyte %B, 13 + ret ubyte %C +} diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index 5523f87c4e6..7ffd3461bc6 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -18,6 +18,11 @@ int %test2(int %A) { ret int %B } +ubyte %test2a(ubyte %A) { + %B = or ubyte %A, 255 + ret ubyte %B +} + bool %test3(bool %A) { %B = or bool %A, false ret bool %B @@ -75,3 +80,14 @@ uint %test13(uint %A) { ; (A|B)^B == A & (~B) %r = xor uint %t1, 123 ret uint %r } + +ubyte %test14(ubyte %A) { + %B = or ubyte %A, 254 + %C = or ubyte %B, 1 + ret ubyte %C +} +ubyte %test15(ubyte %A) { + %B = xor ubyte %A, 17 + %C = xor ubyte %B, 17 + ret ubyte %C +}