1*c85f09ccSJohn Levon struct S {
2*c85f09ccSJohn Levon int :1;
3*c85f09ccSJohn Levon signed int s:2;
4*c85f09ccSJohn Levon unsigned int u:3;
5*c85f09ccSJohn Levon long l;
6*c85f09ccSJohn Levon double d;
7*c85f09ccSJohn Levon };
8*c85f09ccSJohn Levon
os(int i,struct S * b)9*c85f09ccSJohn Levon int os(int i, struct S *b) { return i || b->s; }
ou(int i,struct S * b)10*c85f09ccSJohn Levon int ou(int i, struct S *b) { return i || b->u; }
ol(int i,struct S * b)11*c85f09ccSJohn Levon int ol(int i, struct S *b) { return i || b->l; }
od(int i,struct S * b)12*c85f09ccSJohn Levon int od(int i, struct S *b) { return i || b->d; }
13*c85f09ccSJohn Levon
as(int i,struct S * b)14*c85f09ccSJohn Levon int as(int i, struct S *b) { return i && b->s; }
au(int i,struct S * b)15*c85f09ccSJohn Levon int au(int i, struct S *b) { return i && b->u; }
al(int i,struct S * b)16*c85f09ccSJohn Levon int al(int i, struct S *b) { return i && b->l; }
ad(int i,struct S * b)17*c85f09ccSJohn Levon int ad(int i, struct S *b) { return i && b->d; }
18*c85f09ccSJohn Levon
19*c85f09ccSJohn Levon /*
20*c85f09ccSJohn Levon * check-name: logical
21*c85f09ccSJohn Levon * check-command: test-linearize -m64 -fdump-ir -Wno-decl $file
22*c85f09ccSJohn Levon * check-assert: sizeof(void *) == 8 && sizeof(long) == 8 && sizeof(double) == 8
23*c85f09ccSJohn Levon *
24*c85f09ccSJohn Levon * check-output-start
25*c85f09ccSJohn Levon os:
26*c85f09ccSJohn Levon .L0:
27*c85f09ccSJohn Levon <entry-point>
28*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
29*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
30*c85f09ccSJohn Levon load.32 %r2 <- 0[i]
31*c85f09ccSJohn Levon setne.1 %r3 <- %r2, $0
32*c85f09ccSJohn Levon phisrc.32 %phi1 <- $1
33*c85f09ccSJohn Levon cbr %r3, .L3, .L2
34*c85f09ccSJohn Levon
35*c85f09ccSJohn Levon .L2:
36*c85f09ccSJohn Levon load.64 %r4 <- 0[b]
37*c85f09ccSJohn Levon load.32 %r5 <- 0[%r4]
38*c85f09ccSJohn Levon lsr.32 %r6 <- %r5, $1
39*c85f09ccSJohn Levon trunc.2 %r7 <- (32) %r6
40*c85f09ccSJohn Levon setne.1 %r8 <- %r7, $0
41*c85f09ccSJohn Levon zext.32 %r9 <- (1) %r8
42*c85f09ccSJohn Levon phisrc.32 %phi2 <- %r9
43*c85f09ccSJohn Levon br .L3
44*c85f09ccSJohn Levon
45*c85f09ccSJohn Levon .L3:
46*c85f09ccSJohn Levon phi.32 %r1 <- %phi1, %phi2
47*c85f09ccSJohn Levon phisrc.32 %phi3(return) <- %r1
48*c85f09ccSJohn Levon br .L1
49*c85f09ccSJohn Levon
50*c85f09ccSJohn Levon .L1:
51*c85f09ccSJohn Levon phi.32 %r10 <- %phi3(return)
52*c85f09ccSJohn Levon ret.32 %r10
53*c85f09ccSJohn Levon
54*c85f09ccSJohn Levon
55*c85f09ccSJohn Levon ou:
56*c85f09ccSJohn Levon .L4:
57*c85f09ccSJohn Levon <entry-point>
58*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
59*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
60*c85f09ccSJohn Levon load.32 %r12 <- 0[i]
61*c85f09ccSJohn Levon setne.1 %r13 <- %r12, $0
62*c85f09ccSJohn Levon phisrc.32 %phi4 <- $1
63*c85f09ccSJohn Levon cbr %r13, .L7, .L6
64*c85f09ccSJohn Levon
65*c85f09ccSJohn Levon .L6:
66*c85f09ccSJohn Levon load.64 %r14 <- 0[b]
67*c85f09ccSJohn Levon load.32 %r15 <- 0[%r14]
68*c85f09ccSJohn Levon lsr.32 %r16 <- %r15, $3
69*c85f09ccSJohn Levon trunc.3 %r17 <- (32) %r16
70*c85f09ccSJohn Levon setne.1 %r18 <- %r17, $0
71*c85f09ccSJohn Levon zext.32 %r19 <- (1) %r18
72*c85f09ccSJohn Levon phisrc.32 %phi5 <- %r19
73*c85f09ccSJohn Levon br .L7
74*c85f09ccSJohn Levon
75*c85f09ccSJohn Levon .L7:
76*c85f09ccSJohn Levon phi.32 %r11 <- %phi4, %phi5
77*c85f09ccSJohn Levon phisrc.32 %phi6(return) <- %r11
78*c85f09ccSJohn Levon br .L5
79*c85f09ccSJohn Levon
80*c85f09ccSJohn Levon .L5:
81*c85f09ccSJohn Levon phi.32 %r20 <- %phi6(return)
82*c85f09ccSJohn Levon ret.32 %r20
83*c85f09ccSJohn Levon
84*c85f09ccSJohn Levon
85*c85f09ccSJohn Levon ol:
86*c85f09ccSJohn Levon .L8:
87*c85f09ccSJohn Levon <entry-point>
88*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
89*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
90*c85f09ccSJohn Levon load.32 %r22 <- 0[i]
91*c85f09ccSJohn Levon setne.1 %r23 <- %r22, $0
92*c85f09ccSJohn Levon phisrc.32 %phi7 <- $1
93*c85f09ccSJohn Levon cbr %r23, .L11, .L10
94*c85f09ccSJohn Levon
95*c85f09ccSJohn Levon .L10:
96*c85f09ccSJohn Levon load.64 %r24 <- 0[b]
97*c85f09ccSJohn Levon load.64 %r25 <- 8[%r24]
98*c85f09ccSJohn Levon setne.1 %r26 <- %r25, $0
99*c85f09ccSJohn Levon zext.32 %r27 <- (1) %r26
100*c85f09ccSJohn Levon phisrc.32 %phi8 <- %r27
101*c85f09ccSJohn Levon br .L11
102*c85f09ccSJohn Levon
103*c85f09ccSJohn Levon .L11:
104*c85f09ccSJohn Levon phi.32 %r21 <- %phi7, %phi8
105*c85f09ccSJohn Levon phisrc.32 %phi9(return) <- %r21
106*c85f09ccSJohn Levon br .L9
107*c85f09ccSJohn Levon
108*c85f09ccSJohn Levon .L9:
109*c85f09ccSJohn Levon phi.32 %r28 <- %phi9(return)
110*c85f09ccSJohn Levon ret.32 %r28
111*c85f09ccSJohn Levon
112*c85f09ccSJohn Levon
113*c85f09ccSJohn Levon od:
114*c85f09ccSJohn Levon .L12:
115*c85f09ccSJohn Levon <entry-point>
116*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
117*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
118*c85f09ccSJohn Levon load.32 %r30 <- 0[i]
119*c85f09ccSJohn Levon setne.1 %r31 <- %r30, $0
120*c85f09ccSJohn Levon phisrc.32 %phi10 <- $1
121*c85f09ccSJohn Levon cbr %r31, .L15, .L14
122*c85f09ccSJohn Levon
123*c85f09ccSJohn Levon .L14:
124*c85f09ccSJohn Levon load.64 %r32 <- 0[b]
125*c85f09ccSJohn Levon load.64 %r33 <- 16[%r32]
126*c85f09ccSJohn Levon setfval.64 %r34 <- 0.000000e+00
127*c85f09ccSJohn Levon fcmpune.1 %r35 <- %r33, %r34
128*c85f09ccSJohn Levon zext.32 %r36 <- (1) %r35
129*c85f09ccSJohn Levon phisrc.32 %phi11 <- %r36
130*c85f09ccSJohn Levon br .L15
131*c85f09ccSJohn Levon
132*c85f09ccSJohn Levon .L15:
133*c85f09ccSJohn Levon phi.32 %r29 <- %phi10, %phi11
134*c85f09ccSJohn Levon phisrc.32 %phi12(return) <- %r29
135*c85f09ccSJohn Levon br .L13
136*c85f09ccSJohn Levon
137*c85f09ccSJohn Levon .L13:
138*c85f09ccSJohn Levon phi.32 %r37 <- %phi12(return)
139*c85f09ccSJohn Levon ret.32 %r37
140*c85f09ccSJohn Levon
141*c85f09ccSJohn Levon
142*c85f09ccSJohn Levon as:
143*c85f09ccSJohn Levon .L16:
144*c85f09ccSJohn Levon <entry-point>
145*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
146*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
147*c85f09ccSJohn Levon load.32 %r39 <- 0[i]
148*c85f09ccSJohn Levon setne.1 %r40 <- %r39, $0
149*c85f09ccSJohn Levon phisrc.32 %phi13 <- $0
150*c85f09ccSJohn Levon cbr %r40, .L18, .L19
151*c85f09ccSJohn Levon
152*c85f09ccSJohn Levon .L18:
153*c85f09ccSJohn Levon load.64 %r41 <- 0[b]
154*c85f09ccSJohn Levon load.32 %r42 <- 0[%r41]
155*c85f09ccSJohn Levon lsr.32 %r43 <- %r42, $1
156*c85f09ccSJohn Levon trunc.2 %r44 <- (32) %r43
157*c85f09ccSJohn Levon setne.1 %r45 <- %r44, $0
158*c85f09ccSJohn Levon zext.32 %r46 <- (1) %r45
159*c85f09ccSJohn Levon phisrc.32 %phi14 <- %r46
160*c85f09ccSJohn Levon br .L19
161*c85f09ccSJohn Levon
162*c85f09ccSJohn Levon .L19:
163*c85f09ccSJohn Levon phi.32 %r38 <- %phi13, %phi14
164*c85f09ccSJohn Levon phisrc.32 %phi15(return) <- %r38
165*c85f09ccSJohn Levon br .L17
166*c85f09ccSJohn Levon
167*c85f09ccSJohn Levon .L17:
168*c85f09ccSJohn Levon phi.32 %r47 <- %phi15(return)
169*c85f09ccSJohn Levon ret.32 %r47
170*c85f09ccSJohn Levon
171*c85f09ccSJohn Levon
172*c85f09ccSJohn Levon au:
173*c85f09ccSJohn Levon .L20:
174*c85f09ccSJohn Levon <entry-point>
175*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
176*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
177*c85f09ccSJohn Levon load.32 %r49 <- 0[i]
178*c85f09ccSJohn Levon setne.1 %r50 <- %r49, $0
179*c85f09ccSJohn Levon phisrc.32 %phi16 <- $0
180*c85f09ccSJohn Levon cbr %r50, .L22, .L23
181*c85f09ccSJohn Levon
182*c85f09ccSJohn Levon .L22:
183*c85f09ccSJohn Levon load.64 %r51 <- 0[b]
184*c85f09ccSJohn Levon load.32 %r52 <- 0[%r51]
185*c85f09ccSJohn Levon lsr.32 %r53 <- %r52, $3
186*c85f09ccSJohn Levon trunc.3 %r54 <- (32) %r53
187*c85f09ccSJohn Levon setne.1 %r55 <- %r54, $0
188*c85f09ccSJohn Levon zext.32 %r56 <- (1) %r55
189*c85f09ccSJohn Levon phisrc.32 %phi17 <- %r56
190*c85f09ccSJohn Levon br .L23
191*c85f09ccSJohn Levon
192*c85f09ccSJohn Levon .L23:
193*c85f09ccSJohn Levon phi.32 %r48 <- %phi16, %phi17
194*c85f09ccSJohn Levon phisrc.32 %phi18(return) <- %r48
195*c85f09ccSJohn Levon br .L21
196*c85f09ccSJohn Levon
197*c85f09ccSJohn Levon .L21:
198*c85f09ccSJohn Levon phi.32 %r57 <- %phi18(return)
199*c85f09ccSJohn Levon ret.32 %r57
200*c85f09ccSJohn Levon
201*c85f09ccSJohn Levon
202*c85f09ccSJohn Levon al:
203*c85f09ccSJohn Levon .L24:
204*c85f09ccSJohn Levon <entry-point>
205*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
206*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
207*c85f09ccSJohn Levon load.32 %r59 <- 0[i]
208*c85f09ccSJohn Levon setne.1 %r60 <- %r59, $0
209*c85f09ccSJohn Levon phisrc.32 %phi19 <- $0
210*c85f09ccSJohn Levon cbr %r60, .L26, .L27
211*c85f09ccSJohn Levon
212*c85f09ccSJohn Levon .L26:
213*c85f09ccSJohn Levon load.64 %r61 <- 0[b]
214*c85f09ccSJohn Levon load.64 %r62 <- 8[%r61]
215*c85f09ccSJohn Levon setne.1 %r63 <- %r62, $0
216*c85f09ccSJohn Levon zext.32 %r64 <- (1) %r63
217*c85f09ccSJohn Levon phisrc.32 %phi20 <- %r64
218*c85f09ccSJohn Levon br .L27
219*c85f09ccSJohn Levon
220*c85f09ccSJohn Levon .L27:
221*c85f09ccSJohn Levon phi.32 %r58 <- %phi19, %phi20
222*c85f09ccSJohn Levon phisrc.32 %phi21(return) <- %r58
223*c85f09ccSJohn Levon br .L25
224*c85f09ccSJohn Levon
225*c85f09ccSJohn Levon .L25:
226*c85f09ccSJohn Levon phi.32 %r65 <- %phi21(return)
227*c85f09ccSJohn Levon ret.32 %r65
228*c85f09ccSJohn Levon
229*c85f09ccSJohn Levon
230*c85f09ccSJohn Levon ad:
231*c85f09ccSJohn Levon .L28:
232*c85f09ccSJohn Levon <entry-point>
233*c85f09ccSJohn Levon store.32 %arg1 -> 0[i]
234*c85f09ccSJohn Levon store.64 %arg2 -> 0[b]
235*c85f09ccSJohn Levon load.32 %r67 <- 0[i]
236*c85f09ccSJohn Levon setne.1 %r68 <- %r67, $0
237*c85f09ccSJohn Levon phisrc.32 %phi22 <- $0
238*c85f09ccSJohn Levon cbr %r68, .L30, .L31
239*c85f09ccSJohn Levon
240*c85f09ccSJohn Levon .L30:
241*c85f09ccSJohn Levon load.64 %r69 <- 0[b]
242*c85f09ccSJohn Levon load.64 %r70 <- 16[%r69]
243*c85f09ccSJohn Levon setfval.64 %r71 <- 0.000000e+00
244*c85f09ccSJohn Levon fcmpune.1 %r72 <- %r70, %r71
245*c85f09ccSJohn Levon zext.32 %r73 <- (1) %r72
246*c85f09ccSJohn Levon phisrc.32 %phi23 <- %r73
247*c85f09ccSJohn Levon br .L31
248*c85f09ccSJohn Levon
249*c85f09ccSJohn Levon .L31:
250*c85f09ccSJohn Levon phi.32 %r66 <- %phi22, %phi23
251*c85f09ccSJohn Levon phisrc.32 %phi24(return) <- %r66
252*c85f09ccSJohn Levon br .L29
253*c85f09ccSJohn Levon
254*c85f09ccSJohn Levon .L29:
255*c85f09ccSJohn Levon phi.32 %r74 <- %phi24(return)
256*c85f09ccSJohn Levon ret.32 %r74
257*c85f09ccSJohn Levon
258*c85f09ccSJohn Levon
259*c85f09ccSJohn Levon * check-output-end
260*c85f09ccSJohn Levon */
261