1 ; This test makes sure that these instructions are properly eliminated.
4 ; RUN: as < %s | opt -instcombine | dis | grep -v '%OROK = or' | not grep 'or '
18 ubyte %test2a(ubyte %A) {
23 bool %test3(bool %A) {
24 %B = or bool %A, false
28 bool %test4(bool %A) {
33 bool %test5(bool %A) {
34 %B = xor bool %A, false
43 bool %test7(bool %A) {
53 bool %test9(bool %A) {
63 int %test11(int %A) { ; A ^ ~A == -1
64 %NotA = xor int -1, %A
65 %B = xor int %A, %NotA
69 int %test12(int %A) { ; A | ~A == -1
70 %NotA = xor int -1, %A
75 uint %test13(uint %A) { ; (A|B)^B == A & (~B)
77 %r = xor uint %t1, 123
81 ubyte %test14(ubyte %A) {
86 ubyte %test15(ubyte %A) {
92 int %test16(int %A, int %B) { ; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
95 %OROK = xor int %A1, %B1
99 ubyte %test17(ubyte %A, ubyte %B) { ; Test that (A|c1)|(B|c2) == (A|B)|(c1|c2)
101 %D = or ubyte %B, 254
106 ubyte %test18(bool %c) {
107 %d = xor bool %c, true ; invert the condition
108 br bool %d, label %True, label %False