1 ; This test makes sure that these instructions are properly eliminated.
4 ; RUN: as < %s | opt -instcombine | dis | not grep 'xor '
9 %B = xor bool %A, false
18 bool %test7(bool %A) {
28 int %test11(int %A) { ; A ^ ~A == -1
29 %NotA = xor int -1, %A
30 %B = xor int %A, %NotA
34 uint %test13(uint %A) { ; (A|B)^B == A & (~B)
36 %r = xor uint %t1, 123
40 ubyte %test15(ubyte %A) {
46 int %test16(int %A, int %B) { ; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
49 %OROK = xor int %A1, %B1
53 ubyte %test18(bool %c) {
54 %d = xor bool %c, true ; invert the condition
55 br bool %d, label %True, label %False
62 bool %test19(ubyte %A) {
63 %B = xor ubyte %A, 123 ; xor can be eliminated
64 %C = seteq ubyte %B, 34