1 ; This test makes sure that these instructions are properly eliminated.
4 ; RUN: if as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep or\
21 ubyte %test2a(ubyte %A) {
26 bool %test3(bool %A) {
27 %B = or bool %A, false
31 bool %test4(bool %A) {
36 bool %test5(bool %A) {
37 %B = xor bool %A, false
46 bool %test7(bool %A) {
56 bool %test9(bool %A) {
66 int %test11(int %A) { ; A ^ ~A == -1
67 %NotA = xor int -1, %A
68 %B = xor int %A, %NotA
72 int %test12(int %A) { ; A | ~A == -1
73 %NotA = xor int -1, %A
78 uint %test13(uint %A) { ; (A|B)^B == A & (~B)
80 %r = xor uint %t1, 123
84 ubyte %test14(ubyte %A) {
89 ubyte %test15(ubyte %A) {
95 int %test16(int %A, int %B) { ; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
98 %OROK = xor int %A1, %B1
102 ubyte %test17(ubyte %A, ubyte %B) { ; Test that (A|c1)|(B|c2) == (A|B)|(c1|c2)
104 %D = or ubyte %B, 254
109 ubyte %test18(bool %c) {
110 %d = xor bool %c, true ; invert the condition
111 br bool %d, label %True, label %False