1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
; RUN: grep selb %t1.s | count 160
; RUN: grep and %t1.s | count 2
; RUN: grep xsbh %t1.s | count 1
; RUN: grep xshw %t1.s | count 2
target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
target triple = "spu"
define <16 x i8> @selb_v16i8_1(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg3, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg1 ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg2, %arg3 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_11(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg3, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %arg1, %A ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg3, %arg2 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_12(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg3, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %arg1, %A ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg2, %arg3 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_13(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg3, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg1 ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg2, %arg3 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_2(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg1, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg2 ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg3, %arg1 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_21(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg1, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %arg2, %A ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg3, %arg1 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_3(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%A = xor <16 x i8> %arg2, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg1 ; <<16 x i8>> [#uses=1]
%C = and <16 x i8> %arg3, %arg2 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_4(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%C = and <16 x i8> %arg3, %arg2 ; <<16 x i8>> [#uses=1]
%A = xor <16 x i8> %arg2, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg1 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_41(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%C = and <16 x i8> %arg2, %arg3 ; <<16 x i8>> [#uses=1]
%A = xor <16 x i8> %arg2, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %arg1, %A ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %C, %B ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_42(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%C = and <16 x i8> %arg2, %arg3 ; <<16 x i8>> [#uses=1]
%A = xor <16 x i8> %arg2, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg1 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %C, %B ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <16 x i8> @selb_v16i8_5(<16 x i8> %arg1, <16 x i8> %arg2, <16 x i8> %arg3) {
%C = and <16 x i8> %arg2, %arg1 ; <<16 x i8>> [#uses=1]
%A = xor <16 x i8> %arg1, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1,
i8 -1, i8 -1, i8 -1, i8 -1 >
%B = and <16 x i8> %A, %arg3 ; <<16 x i8>> [#uses=1]
%D = or <16 x i8> %B, %C ; <<16 x i8>> [#uses=1]
ret <16 x i8> %D
}
define <8 x i16> @selb_v8i16_1(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg3, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg1 ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg2, %arg3 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_11(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg3, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %arg1, %A ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg3, %arg2 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_12(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg3, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %arg1, %A ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg2, %arg3 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_13(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg3, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg1 ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg2, %arg3 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_2(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg1, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg2 ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg3, %arg1 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_21(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg1, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %arg2, %A ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg3, %arg1 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_3(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%A = xor <8 x i16> %arg2, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg1 ; <<8 x i16>> [#uses=1]
%C = and <8 x i16> %arg3, %arg2 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_4(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%C = and <8 x i16> %arg3, %arg2 ; <<8 x i16>> [#uses=1]
%A = xor <8 x i16> %arg2, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg1 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_41(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%C = and <8 x i16> %arg2, %arg3 ; <<8 x i16>> [#uses=1]
%A = xor <8 x i16> %arg2, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %arg1, %A ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %C, %B ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_42(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%C = and <8 x i16> %arg2, %arg3 ; <<8 x i16>> [#uses=1]
%A = xor <8 x i16> %arg2, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg1 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %C, %B ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <8 x i16> @selb_v8i16_5(<8 x i16> %arg1, <8 x i16> %arg2, <8 x i16> %arg3) {
%C = and <8 x i16> %arg2, %arg1 ; <<8 x i16>> [#uses=1]
%A = xor <8 x i16> %arg1, < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1,
i16 -1, i16 -1 >
%B = and <8 x i16> %A, %arg3 ; <<8 x i16>> [#uses=1]
%D = or <8 x i16> %B, %C ; <<8 x i16>> [#uses=1]
ret <8 x i16> %D
}
define <4 x i32> @selb_v4i32_1(<4 x i32> %arg1, <4 x i32> %arg2, <4 x i32> %arg3) {
%tmpnot = xor <4 x i32> %arg3, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%tmp2 = and <4 x i32> %tmpnot, %arg1 ; <<4 x i32>> [#uses=1]
%tmp5 = and <4 x i32> %arg2, %arg3 ; <<4 x i32>> [#uses=1]
%tmp6 = or <4 x i32> %tmp2, %tmp5 ; <<4 x i32>> [#uses=1]
ret <4 x i32> %tmp6
}
define <4 x i32> @selb_v4i32_2(<4 x i32> %arg1, <4 x i32> %arg2, <4 x i32> %arg3) {
%tmpnot = xor <4 x i32> %arg3, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%tmp2 = and <4 x i32> %tmpnot, %arg1 ; <<4 x i32>> [#uses=1]
%tmp5 = and <4 x i32> %arg2, %arg3 ; <<4 x i32>> [#uses=1]
%tmp6 = or <4 x i32> %tmp2, %tmp5 ; <<4 x i32>> [#uses=1]
ret <4 x i32> %tmp6
}
define <4 x i32> @selb_v4i32_3(<4 x i32> %arg1, <4 x i32> %arg2, <4 x i32> %arg3) {
%tmpnot = xor <4 x i32> %arg3, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%tmp2 = and <4 x i32> %tmpnot, %arg1 ; <<4 x i32>> [#uses=1]
%tmp5 = and <4 x i32> %arg3, %arg2 ; <<4 x i32>> [#uses=1]
%tmp6 = or <4 x i32> %tmp2, %tmp5 ; <<4 x i32>> [#uses=1]
ret <4 x i32> %tmp6
}
define <4 x i32> @selb_v4i32_4(<4 x i32> %arg1, <4 x i32> %arg2, <4 x i32> %arg3) {
%tmp2 = and <4 x i32> %arg3, %arg2 ; <<4 x i32>> [#uses=1]
%tmp3not = xor <4 x i32> %arg3, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%tmp5 = and <4 x i32> %tmp3not, %arg1 ; <<4 x i32>> [#uses=1]
%tmp6 = or <4 x i32> %tmp2, %tmp5 ; <<4 x i32>> [#uses=1]
ret <4 x i32> %tmp6
}
define <4 x i32> @selb_v4i32_5(<4 x i32> %arg1, <4 x i32> %arg2, <4 x i32> %arg3) {
%tmp2 = and <4 x i32> %arg3, %arg2 ; <<4 x i32>> [#uses=1]
%tmp3not = xor <4 x i32> %arg3, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
%tmp5 = and <4 x i32> %tmp3not, %arg1 ; <<4 x i32>> [#uses=1]
%tmp6 = or <4 x i32> %tmp2, %tmp5 ; <<4 x i32>> [#uses=1]
ret <4 x i32> %tmp6
}
define i32 @selb_i32(i32 %arg1, i32 %arg2, i32 %arg3) {
%tmp1not = xor i32 %arg3, -1 ; <i32> [#uses=1]
%tmp3 = and i32 %tmp1not, %arg1 ; <i32> [#uses=1]
%tmp6 = and i32 %arg3, %arg2 ; <i32> [#uses=1]
%tmp7 = or i32 %tmp3, %tmp6 ; <i32> [#uses=1]
ret i32 %tmp7
}
define i16 @selb_i16(i16 signext %arg1, i16 signext %arg2, i16 signext %arg3) signext {
%tmp3 = and i16 %arg3, %arg1 ; <i16> [#uses=1]
%tmp4not = xor i16 %arg3, -1 ; <i16> [#uses=1]
%tmp6 = and i16 %tmp4not, %arg2 ; <i16> [#uses=1]
%retval1011 = or i16 %tmp3, %tmp6 ; <i16> [#uses=1]
ret i16 %retval1011
}
define i16 @selb_i16u(i16 zeroext %arg1, i16 zeroext %arg2, i16 zeroext %arg3) zeroext {
%tmp3 = and i16 %arg3, %arg1 ; <i16> [#uses=1]
%tmp4not = xor i16 %arg3, -1 ; <i16> [#uses=1]
%tmp6 = and i16 %tmp4not, %arg2 ; <i16> [#uses=1]
%retval1011 = or i16 %tmp3, %tmp6 ; <i16> [#uses=1]
ret i16 %retval1011
}
define i8 @selb_i8u(i8 zeroext %arg1, i8 zeroext %arg2, i8 zeroext %arg3) zeroext {
%tmp3 = and i8 %arg3, %arg1 ; <i8> [#uses=1]
%tmp4not = xor i8 %arg3, -1 ; <i8> [#uses=1]
%tmp6 = and i8 %tmp4not, %arg2 ; <i8> [#uses=1]
%retval1011 = or i8 %tmp3, %tmp6 ; <i8> [#uses=1]
ret i8 %retval1011
}
define i8 @selb_i8(i8 signext %arg1, i8 signext %arg2, i8 signext %arg3) signext {
%tmp3 = and i8 %arg3, %arg1 ; <i8> [#uses=1]
%tmp4not = xor i8 %arg3, -1 ; <i8> [#uses=1]
%tmp6 = and i8 %tmp4not, %arg2 ; <i8> [#uses=1]
%retval1011 = or i8 %tmp3, %tmp6 ; <i8> [#uses=1]
ret i8 %retval1011
}
|