diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll index 23a20fd46f2..e0c4d180e18 100644 --- a/test/Transforms/InstCombine/and.ll +++ b/test/Transforms/InstCombine/and.ll @@ -58,3 +58,10 @@ bool %test9(uint %A) { %C = cast uint %B to bool ret bool %C } + +uint %test10(uint %A) { + %B = and uint %A, 12 + %C = xor uint %B, 15 + %D = and uint %C, 1 + ret uint %D +} diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index e89009547ba..0ffc8e1870d 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -117,3 +117,15 @@ bool %test19(ubyte %A) { %C = seteq ubyte %B, 34 ret bool %C } + + +bool %test20(int %A) { + %B = xor int %A, -1 + %C = and int %B, 4 + %D = setne int %C, 0 + %E = and int %B, 123 ; Make the usecount of B = 2 + %F = cast int %E to bool + %G = and bool %D, %F + ret bool %G +} +