1*c85f09ccSJohn Levon typedef unsigned int uint;
2*c85f09ccSJohn Levon typedef _Bool bool;
3*c85f09ccSJohn Levon 
ini(uint a)4*c85f09ccSJohn Levon static uint   ini(uint a) { return !a; }
bni(uint a)5*c85f09ccSJohn Levon static bool   bni(uint a) { return !a; }
ioii(uint a,uint b)6*c85f09ccSJohn Levon static uint  ioii(uint a, uint b) { return a || b; }
iaii(uint a,uint b)7*c85f09ccSJohn Levon static uint  iaii(uint a, uint b) { return a && b; }
boii(uint a,uint b)8*c85f09ccSJohn Levon static bool  boii(uint a, uint b) { return a || b; }
baii(uint a,uint b)9*c85f09ccSJohn Levon static bool  baii(uint a, uint b) { return a && b; }
ioiii(uint a,uint b,uint c)10*c85f09ccSJohn Levon static uint ioiii(uint a, uint b, uint c) { return a || b || c; }
iaiii(uint a,uint b,uint c)11*c85f09ccSJohn Levon static uint iaiii(uint a, uint b, uint c) { return a && b && c; }
boiii(uint a,uint b,uint c)12*c85f09ccSJohn Levon static bool boiii(uint a, uint b, uint c) { return a || b || c; }
baiii(uint a,uint b,uint c)13*c85f09ccSJohn Levon static bool baiii(uint a, uint b, uint c) { return a && b && c; }
14*c85f09ccSJohn Levon 
inb(bool a)15*c85f09ccSJohn Levon static uint   inb(bool a) { return !a; }
bnb(bool a)16*c85f09ccSJohn Levon static bool   bnb(bool a) { return !a; }
iobb(bool a,bool b)17*c85f09ccSJohn Levon static uint  iobb(bool a, bool b) { return a || b; }
iabb(bool a,bool b)18*c85f09ccSJohn Levon static uint  iabb(bool a, bool b) { return a && b; }
bobb(bool a,bool b)19*c85f09ccSJohn Levon static bool  bobb(bool a, bool b) { return a || b; }
babb(bool a,bool b)20*c85f09ccSJohn Levon static bool  babb(bool a, bool b) { return a && b; }
iobbb(bool a,bool b,bool c)21*c85f09ccSJohn Levon static uint iobbb(bool a, bool b, bool c) { return a || b || c; }
iabbb(bool a,bool b,bool c)22*c85f09ccSJohn Levon static uint iabbb(bool a, bool b, bool c) { return a && b && c; }
bobbb(bool a,bool b,bool c)23*c85f09ccSJohn Levon static bool bobbb(bool a, bool b, bool c) { return a || b || c; }
babbb(bool a,bool b,bool c)24*c85f09ccSJohn Levon static bool babbb(bool a, bool b, bool c) { return a && b && c; }
25*c85f09ccSJohn Levon 
26*c85f09ccSJohn Levon /*
27*c85f09ccSJohn Levon  * check-name: bool-simplify2
28*c85f09ccSJohn Levon  * check-command: test-linearize $file
29*c85f09ccSJohn Levon  *
30*c85f09ccSJohn Levon  * check-output-pattern(20): setne\\.
31*c85f09ccSJohn Levon  * check-output-pattern(4):  seteq\\.
32*c85f09ccSJohn Levon  * check-output-pattern(8): zext\\.
33*c85f09ccSJohn Levon  * check-output-pattern(12): and
34*c85f09ccSJohn Levon  * check-output-pattern(12): or
35*c85f09ccSJohn Levon  * check-output-end
36*c85f09ccSJohn Levon  *
37*c85f09ccSJohn Levon  * check-output-start
38*c85f09ccSJohn Levon ini:
39*c85f09ccSJohn Levon .L0:
40*c85f09ccSJohn Levon 	<entry-point>
41*c85f09ccSJohn Levon 	seteq.32    %r2 <- %arg1, $0
42*c85f09ccSJohn Levon 	ret.32      %r2
43*c85f09ccSJohn Levon 
44*c85f09ccSJohn Levon 
45*c85f09ccSJohn Levon bni:
46*c85f09ccSJohn Levon .L2:
47*c85f09ccSJohn Levon 	<entry-point>
48*c85f09ccSJohn Levon 	seteq.1     %r6 <- %arg1, $0
49*c85f09ccSJohn Levon 	ret.1       %r6
50*c85f09ccSJohn Levon 
51*c85f09ccSJohn Levon 
52*c85f09ccSJohn Levon ioii:
53*c85f09ccSJohn Levon .L4:
54*c85f09ccSJohn Levon 	<entry-point>
55*c85f09ccSJohn Levon 	setne.1     %r9 <- %arg1, $0
56*c85f09ccSJohn Levon 	setne.1     %r11 <- %arg2, $0
57*c85f09ccSJohn Levon 	or.1        %r12 <- %r9, %r11
58*c85f09ccSJohn Levon 	zext.32     %r13 <- (1) %r12
59*c85f09ccSJohn Levon 	ret.32      %r13
60*c85f09ccSJohn Levon 
61*c85f09ccSJohn Levon 
62*c85f09ccSJohn Levon iaii:
63*c85f09ccSJohn Levon .L6:
64*c85f09ccSJohn Levon 	<entry-point>
65*c85f09ccSJohn Levon 	setne.1     %r16 <- %arg1, $0
66*c85f09ccSJohn Levon 	setne.1     %r18 <- %arg2, $0
67*c85f09ccSJohn Levon 	and.1       %r19 <- %r16, %r18
68*c85f09ccSJohn Levon 	zext.32     %r20 <- (1) %r19
69*c85f09ccSJohn Levon 	ret.32      %r20
70*c85f09ccSJohn Levon 
71*c85f09ccSJohn Levon 
72*c85f09ccSJohn Levon boii:
73*c85f09ccSJohn Levon .L8:
74*c85f09ccSJohn Levon 	<entry-point>
75*c85f09ccSJohn Levon 	setne.1     %r23 <- %arg1, $0
76*c85f09ccSJohn Levon 	setne.1     %r25 <- %arg2, $0
77*c85f09ccSJohn Levon 	or.1        %r26 <- %r23, %r25
78*c85f09ccSJohn Levon 	ret.1       %r26
79*c85f09ccSJohn Levon 
80*c85f09ccSJohn Levon 
81*c85f09ccSJohn Levon baii:
82*c85f09ccSJohn Levon .L10:
83*c85f09ccSJohn Levon 	<entry-point>
84*c85f09ccSJohn Levon 	setne.1     %r31 <- %arg1, $0
85*c85f09ccSJohn Levon 	setne.1     %r33 <- %arg2, $0
86*c85f09ccSJohn Levon 	and.1       %r34 <- %r31, %r33
87*c85f09ccSJohn Levon 	ret.1       %r34
88*c85f09ccSJohn Levon 
89*c85f09ccSJohn Levon 
90*c85f09ccSJohn Levon ioiii:
91*c85f09ccSJohn Levon .L12:
92*c85f09ccSJohn Levon 	<entry-point>
93*c85f09ccSJohn Levon 	setne.1     %r39 <- %arg1, $0
94*c85f09ccSJohn Levon 	setne.1     %r41 <- %arg2, $0
95*c85f09ccSJohn Levon 	or.1        %r42 <- %r39, %r41
96*c85f09ccSJohn Levon 	setne.1     %r46 <- %arg3, $0
97*c85f09ccSJohn Levon 	or.1        %r47 <- %r42, %r46
98*c85f09ccSJohn Levon 	zext.32     %r48 <- (1) %r47
99*c85f09ccSJohn Levon 	ret.32      %r48
100*c85f09ccSJohn Levon 
101*c85f09ccSJohn Levon 
102*c85f09ccSJohn Levon iaiii:
103*c85f09ccSJohn Levon .L14:
104*c85f09ccSJohn Levon 	<entry-point>
105*c85f09ccSJohn Levon 	setne.1     %r51 <- %arg1, $0
106*c85f09ccSJohn Levon 	setne.1     %r53 <- %arg2, $0
107*c85f09ccSJohn Levon 	and.1       %r54 <- %r51, %r53
108*c85f09ccSJohn Levon 	setne.1     %r58 <- %arg3, $0
109*c85f09ccSJohn Levon 	and.1       %r59 <- %r54, %r58
110*c85f09ccSJohn Levon 	zext.32     %r60 <- (1) %r59
111*c85f09ccSJohn Levon 	ret.32      %r60
112*c85f09ccSJohn Levon 
113*c85f09ccSJohn Levon 
114*c85f09ccSJohn Levon boiii:
115*c85f09ccSJohn Levon .L16:
116*c85f09ccSJohn Levon 	<entry-point>
117*c85f09ccSJohn Levon 	setne.1     %r63 <- %arg1, $0
118*c85f09ccSJohn Levon 	setne.1     %r65 <- %arg2, $0
119*c85f09ccSJohn Levon 	or.1        %r66 <- %r63, %r65
120*c85f09ccSJohn Levon 	setne.1     %r70 <- %arg3, $0
121*c85f09ccSJohn Levon 	or.1        %r71 <- %r66, %r70
122*c85f09ccSJohn Levon 	ret.1       %r71
123*c85f09ccSJohn Levon 
124*c85f09ccSJohn Levon 
125*c85f09ccSJohn Levon baiii:
126*c85f09ccSJohn Levon .L18:
127*c85f09ccSJohn Levon 	<entry-point>
128*c85f09ccSJohn Levon 	setne.1     %r76 <- %arg1, $0
129*c85f09ccSJohn Levon 	setne.1     %r78 <- %arg2, $0
130*c85f09ccSJohn Levon 	and.1       %r79 <- %r76, %r78
131*c85f09ccSJohn Levon 	setne.1     %r83 <- %arg3, $0
132*c85f09ccSJohn Levon 	and.1       %r84 <- %r79, %r83
133*c85f09ccSJohn Levon 	ret.1       %r84
134*c85f09ccSJohn Levon 
135*c85f09ccSJohn Levon 
136*c85f09ccSJohn Levon inb:
137*c85f09ccSJohn Levon .L20:
138*c85f09ccSJohn Levon 	<entry-point>
139*c85f09ccSJohn Levon 	seteq.32    %r89 <- %arg1, $0
140*c85f09ccSJohn Levon 	ret.32      %r89
141*c85f09ccSJohn Levon 
142*c85f09ccSJohn Levon 
143*c85f09ccSJohn Levon bnb:
144*c85f09ccSJohn Levon .L22:
145*c85f09ccSJohn Levon 	<entry-point>
146*c85f09ccSJohn Levon 	seteq.1     %r93 <- %arg1, $0
147*c85f09ccSJohn Levon 	ret.1       %r93
148*c85f09ccSJohn Levon 
149*c85f09ccSJohn Levon 
150*c85f09ccSJohn Levon iobb:
151*c85f09ccSJohn Levon .L24:
152*c85f09ccSJohn Levon 	<entry-point>
153*c85f09ccSJohn Levon 	or.1        %r97 <- %arg1, %arg2
154*c85f09ccSJohn Levon 	zext.32     %r98 <- (1) %r97
155*c85f09ccSJohn Levon 	ret.32      %r98
156*c85f09ccSJohn Levon 
157*c85f09ccSJohn Levon 
158*c85f09ccSJohn Levon iabb:
159*c85f09ccSJohn Levon .L26:
160*c85f09ccSJohn Levon 	<entry-point>
161*c85f09ccSJohn Levon 	and.1       %r102 <- %arg1, %arg2
162*c85f09ccSJohn Levon 	zext.32     %r103 <- (1) %r102
163*c85f09ccSJohn Levon 	ret.32      %r103
164*c85f09ccSJohn Levon 
165*c85f09ccSJohn Levon 
166*c85f09ccSJohn Levon bobb:
167*c85f09ccSJohn Levon .L28:
168*c85f09ccSJohn Levon 	<entry-point>
169*c85f09ccSJohn Levon 	or.1        %r107 <- %arg1, %arg2
170*c85f09ccSJohn Levon 	ret.1       %r107
171*c85f09ccSJohn Levon 
172*c85f09ccSJohn Levon 
173*c85f09ccSJohn Levon babb:
174*c85f09ccSJohn Levon .L30:
175*c85f09ccSJohn Levon 	<entry-point>
176*c85f09ccSJohn Levon 	and.1       %r113 <- %arg1, %arg2
177*c85f09ccSJohn Levon 	ret.1       %r113
178*c85f09ccSJohn Levon 
179*c85f09ccSJohn Levon 
180*c85f09ccSJohn Levon iobbb:
181*c85f09ccSJohn Levon .L32:
182*c85f09ccSJohn Levon 	<entry-point>
183*c85f09ccSJohn Levon 	or.1        %r119 <- %arg1, %arg2
184*c85f09ccSJohn Levon 	or.1        %r123 <- %r119, %arg3
185*c85f09ccSJohn Levon 	zext.32     %r124 <- (1) %r123
186*c85f09ccSJohn Levon 	ret.32      %r124
187*c85f09ccSJohn Levon 
188*c85f09ccSJohn Levon 
189*c85f09ccSJohn Levon iabbb:
190*c85f09ccSJohn Levon .L34:
191*c85f09ccSJohn Levon 	<entry-point>
192*c85f09ccSJohn Levon 	and.1       %r128 <- %arg1, %arg2
193*c85f09ccSJohn Levon 	and.1       %r132 <- %r128, %arg3
194*c85f09ccSJohn Levon 	zext.32     %r133 <- (1) %r132
195*c85f09ccSJohn Levon 	ret.32      %r133
196*c85f09ccSJohn Levon 
197*c85f09ccSJohn Levon 
198*c85f09ccSJohn Levon bobbb:
199*c85f09ccSJohn Levon .L36:
200*c85f09ccSJohn Levon 	<entry-point>
201*c85f09ccSJohn Levon 	or.1        %r137 <- %arg1, %arg2
202*c85f09ccSJohn Levon 	or.1        %r141 <- %r137, %arg3
203*c85f09ccSJohn Levon 	ret.1       %r141
204*c85f09ccSJohn Levon 
205*c85f09ccSJohn Levon 
206*c85f09ccSJohn Levon babbb:
207*c85f09ccSJohn Levon .L38:
208*c85f09ccSJohn Levon 	<entry-point>
209*c85f09ccSJohn Levon 	and.1       %r147 <- %arg1, %arg2
210*c85f09ccSJohn Levon 	and.1       %r151 <- %r147, %arg3
211*c85f09ccSJohn Levon 	ret.1       %r151
212*c85f09ccSJohn Levon 
213*c85f09ccSJohn Levon 
214*c85f09ccSJohn Levon  * check-output-end
215*c85f09ccSJohn Levon  */
216