Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: tests_lit/llvm2ice_tests/vector-arith.ll

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-arg.ll ('k') | tests_lit/llvm2ice_tests/vector-bitcast.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This test checks support for vector arithmetic. 1 ; This test checks support for vector arithmetic.
2 2
3 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -O2 \ 3 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -O2 \
4 ; RUN: | FileCheck %s 4 ; RUN: | FileCheck %s
5 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -Om1 \ 5 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -Om1 \
6 ; RUN: | FileCheck %s 6 ; RUN: | FileCheck %s
7 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -O2 -mattr=sse4.1 \ 7 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -O2 -mattr=sse4.1 \
8 ; RUN: | FileCheck --check-prefix=SSE41 %s 8 ; RUN: | FileCheck --check-prefix=SSE41 %s
9 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -Om1 -mattr=sse4.1 \ 9 ; RUN: %p2i -i %s --filetype=obj --disassemble -a -Om1 -mattr=sse4.1 \
10 ; RUN: | FileCheck --check-prefix=SSE41 %s 10 ; RUN: | FileCheck --check-prefix=SSE41 %s
11 11
12 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) { 12 define internal <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) {
13 entry: 13 entry:
14 %res = fadd <4 x float> %arg0, %arg1 14 %res = fadd <4 x float> %arg0, %arg1
15 ret <4 x float> %res 15 ret <4 x float> %res
16 ; CHECK-LABEL: test_fadd 16 ; CHECK-LABEL: test_fadd
17 ; CHECK: addps 17 ; CHECK: addps
18 } 18 }
19 19
20 define <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) { 20 define internal <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) {
21 entry: 21 entry:
22 %res = fsub <4 x float> %arg0, %arg1 22 %res = fsub <4 x float> %arg0, %arg1
23 ret <4 x float> %res 23 ret <4 x float> %res
24 ; CHECK-LABEL: test_fsub 24 ; CHECK-LABEL: test_fsub
25 ; CHECK: subps 25 ; CHECK: subps
26 } 26 }
27 27
28 define <4 x float> @test_fmul(<4 x float> %arg0, <4 x float> %arg1) { 28 define internal <4 x float> @test_fmul(<4 x float> %arg0, <4 x float> %arg1) {
29 entry: 29 entry:
30 %res = fmul <4 x float> %arg0, %arg1 30 %res = fmul <4 x float> %arg0, %arg1
31 ret <4 x float> %res 31 ret <4 x float> %res
32 ; CHECK-LABEL: test_fmul 32 ; CHECK-LABEL: test_fmul
33 ; CHECK: mulps 33 ; CHECK: mulps
34 } 34 }
35 35
36 define <4 x float> @test_fdiv(<4 x float> %arg0, <4 x float> %arg1) { 36 define internal <4 x float> @test_fdiv(<4 x float> %arg0, <4 x float> %arg1) {
37 entry: 37 entry:
38 %res = fdiv <4 x float> %arg0, %arg1 38 %res = fdiv <4 x float> %arg0, %arg1
39 ret <4 x float> %res 39 ret <4 x float> %res
40 ; CHECK-LABEL: test_fdiv 40 ; CHECK-LABEL: test_fdiv
41 ; CHECK: divps 41 ; CHECK: divps
42 } 42 }
43 43
44 define <4 x float> @test_frem(<4 x float> %arg0, <4 x float> %arg1) { 44 define internal <4 x float> @test_frem(<4 x float> %arg0, <4 x float> %arg1) {
45 entry: 45 entry:
46 %res = frem <4 x float> %arg0, %arg1 46 %res = frem <4 x float> %arg0, %arg1
47 ret <4 x float> %res 47 ret <4 x float> %res
48 ; CHECK-LABEL: test_frem 48 ; CHECK-LABEL: test_frem
49 ; CHECK: fmodf 49 ; CHECK: fmodf
50 ; CHECK: fmodf 50 ; CHECK: fmodf
51 ; CHECK: fmodf 51 ; CHECK: fmodf
52 ; CHECK: fmodf 52 ; CHECK: fmodf
53 } 53 }
54 54
55 define <16 x i8> @test_add_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 55 define internal <16 x i8> @test_add_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
56 entry: 56 entry:
57 %res = add <16 x i8> %arg0, %arg1 57 %res = add <16 x i8> %arg0, %arg1
58 ret <16 x i8> %res 58 ret <16 x i8> %res
59 ; CHECK-LABEL: test_add_v16i8 59 ; CHECK-LABEL: test_add_v16i8
60 ; CHECK: paddb 60 ; CHECK: paddb
61 } 61 }
62 62
63 define <16 x i8> @test_and_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 63 define internal <16 x i8> @test_and_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
64 entry: 64 entry:
65 %res = and <16 x i8> %arg0, %arg1 65 %res = and <16 x i8> %arg0, %arg1
66 ret <16 x i8> %res 66 ret <16 x i8> %res
67 ; CHECK-LABEL: test_and_v16i8 67 ; CHECK-LABEL: test_and_v16i8
68 ; CHECK: pand 68 ; CHECK: pand
69 } 69 }
70 70
71 define <16 x i8> @test_or_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 71 define internal <16 x i8> @test_or_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
72 entry: 72 entry:
73 %res = or <16 x i8> %arg0, %arg1 73 %res = or <16 x i8> %arg0, %arg1
74 ret <16 x i8> %res 74 ret <16 x i8> %res
75 ; CHECK-LABEL: test_or_v16i8 75 ; CHECK-LABEL: test_or_v16i8
76 ; CHECK: por 76 ; CHECK: por
77 } 77 }
78 78
79 define <16 x i8> @test_xor_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 79 define internal <16 x i8> @test_xor_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
80 entry: 80 entry:
81 %res = xor <16 x i8> %arg0, %arg1 81 %res = xor <16 x i8> %arg0, %arg1
82 ret <16 x i8> %res 82 ret <16 x i8> %res
83 ; CHECK-LABEL: test_xor_v16i8 83 ; CHECK-LABEL: test_xor_v16i8
84 ; CHECK: pxor 84 ; CHECK: pxor
85 } 85 }
86 86
87 define <16 x i8> @test_sub_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 87 define internal <16 x i8> @test_sub_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
88 entry: 88 entry:
89 %res = sub <16 x i8> %arg0, %arg1 89 %res = sub <16 x i8> %arg0, %arg1
90 ret <16 x i8> %res 90 ret <16 x i8> %res
91 ; CHECK-LABEL: test_sub_v16i8 91 ; CHECK-LABEL: test_sub_v16i8
92 ; CHECK: psubb 92 ; CHECK: psubb
93 } 93 }
94 94
95 define <16 x i8> @test_mul_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 95 define internal <16 x i8> @test_mul_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
96 entry: 96 entry:
97 %res = mul <16 x i8> %arg0, %arg1 97 %res = mul <16 x i8> %arg0, %arg1
98 ret <16 x i8> %res 98 ret <16 x i8> %res
99 ; CHECK-LABEL: test_mul_v16i8 99 ; CHECK-LABEL: test_mul_v16i8
100 ; CHECK: imul 100 ; CHECK: imul
101 ; CHECK: imul 101 ; CHECK: imul
102 ; CHECK: imul 102 ; CHECK: imul
103 ; CHECK: imul 103 ; CHECK: imul
104 ; CHECK: imul 104 ; CHECK: imul
105 ; CHECK: imul 105 ; CHECK: imul
106 ; CHECK: imul 106 ; CHECK: imul
107 ; CHECK: imul 107 ; CHECK: imul
108 ; CHECK: imul 108 ; CHECK: imul
109 ; CHECK: imul 109 ; CHECK: imul
110 ; CHECK: imul 110 ; CHECK: imul
111 ; CHECK: imul 111 ; CHECK: imul
112 ; CHECK: imul 112 ; CHECK: imul
113 ; CHECK: imul 113 ; CHECK: imul
114 ; CHECK: imul 114 ; CHECK: imul
115 ; CHECK: imul 115 ; CHECK: imul
116 } 116 }
117 117
118 define <16 x i8> @test_shl_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 118 define internal <16 x i8> @test_shl_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
119 entry: 119 entry:
120 %res = shl <16 x i8> %arg0, %arg1 120 %res = shl <16 x i8> %arg0, %arg1
121 ret <16 x i8> %res 121 ret <16 x i8> %res
122 ; CHECK-LABEL: test_shl_v16i8 122 ; CHECK-LABEL: test_shl_v16i8
123 ; CHECK: shl 123 ; CHECK: shl
124 ; CHECK: shl 124 ; CHECK: shl
125 ; CHECK: shl 125 ; CHECK: shl
126 ; CHECK: shl 126 ; CHECK: shl
127 ; CHECK: shl 127 ; CHECK: shl
128 ; CHECK: shl 128 ; CHECK: shl
129 ; CHECK: shl 129 ; CHECK: shl
130 ; CHECK: shl 130 ; CHECK: shl
131 ; CHECK: shl 131 ; CHECK: shl
132 ; CHECK: shl 132 ; CHECK: shl
133 ; CHECK: shl 133 ; CHECK: shl
134 ; CHECK: shl 134 ; CHECK: shl
135 ; CHECK: shl 135 ; CHECK: shl
136 ; CHECK: shl 136 ; CHECK: shl
137 ; CHECK: shl 137 ; CHECK: shl
138 ; CHECK: shl 138 ; CHECK: shl
139 } 139 }
140 140
141 define <16 x i8> @test_lshr_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 141 define internal <16 x i8> @test_lshr_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
142 entry: 142 entry:
143 %res = lshr <16 x i8> %arg0, %arg1 143 %res = lshr <16 x i8> %arg0, %arg1
144 ret <16 x i8> %res 144 ret <16 x i8> %res
145 ; CHECK-LABEL: test_lshr_v16i8 145 ; CHECK-LABEL: test_lshr_v16i8
146 ; CHECK: shr 146 ; CHECK: shr
147 ; CHECK: shr 147 ; CHECK: shr
148 ; CHECK: shr 148 ; CHECK: shr
149 ; CHECK: shr 149 ; CHECK: shr
150 ; CHECK: shr 150 ; CHECK: shr
151 ; CHECK: shr 151 ; CHECK: shr
152 ; CHECK: shr 152 ; CHECK: shr
153 ; CHECK: shr 153 ; CHECK: shr
154 ; CHECK: shr 154 ; CHECK: shr
155 ; CHECK: shr 155 ; CHECK: shr
156 ; CHECK: shr 156 ; CHECK: shr
157 ; CHECK: shr 157 ; CHECK: shr
158 ; CHECK: shr 158 ; CHECK: shr
159 ; CHECK: shr 159 ; CHECK: shr
160 ; CHECK: shr 160 ; CHECK: shr
161 ; CHECK: shr 161 ; CHECK: shr
162 } 162 }
163 163
164 define <16 x i8> @test_ashr_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 164 define internal <16 x i8> @test_ashr_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
165 entry: 165 entry:
166 %res = ashr <16 x i8> %arg0, %arg1 166 %res = ashr <16 x i8> %arg0, %arg1
167 ret <16 x i8> %res 167 ret <16 x i8> %res
168 ; CHECK-LABEL: test_ashr_v16i8 168 ; CHECK-LABEL: test_ashr_v16i8
169 ; CHECK: sar 169 ; CHECK: sar
170 ; CHECK: sar 170 ; CHECK: sar
171 ; CHECK: sar 171 ; CHECK: sar
172 ; CHECK: sar 172 ; CHECK: sar
173 ; CHECK: sar 173 ; CHECK: sar
174 ; CHECK: sar 174 ; CHECK: sar
175 ; CHECK: sar 175 ; CHECK: sar
176 ; CHECK: sar 176 ; CHECK: sar
177 ; CHECK: sar 177 ; CHECK: sar
178 ; CHECK: sar 178 ; CHECK: sar
179 ; CHECK: sar 179 ; CHECK: sar
180 ; CHECK: sar 180 ; CHECK: sar
181 ; CHECK: sar 181 ; CHECK: sar
182 ; CHECK: sar 182 ; CHECK: sar
183 ; CHECK: sar 183 ; CHECK: sar
184 ; CHECK: sar 184 ; CHECK: sar
185 } 185 }
186 186
187 define <16 x i8> @test_udiv_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 187 define internal <16 x i8> @test_udiv_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
188 entry: 188 entry:
189 %res = udiv <16 x i8> %arg0, %arg1 189 %res = udiv <16 x i8> %arg0, %arg1
190 ret <16 x i8> %res 190 ret <16 x i8> %res
191 ; CHECK-LABEL: test_udiv_v16i8 191 ; CHECK-LABEL: test_udiv_v16i8
192 ; CHECK: div 192 ; CHECK: div
193 ; CHECK: div 193 ; CHECK: div
194 ; CHECK: div 194 ; CHECK: div
195 ; CHECK: div 195 ; CHECK: div
196 ; CHECK: div 196 ; CHECK: div
197 ; CHECK: div 197 ; CHECK: div
198 ; CHECK: div 198 ; CHECK: div
199 ; CHECK: div 199 ; CHECK: div
200 ; CHECK: div 200 ; CHECK: div
201 ; CHECK: div 201 ; CHECK: div
202 ; CHECK: div 202 ; CHECK: div
203 ; CHECK: div 203 ; CHECK: div
204 ; CHECK: div 204 ; CHECK: div
205 ; CHECK: div 205 ; CHECK: div
206 ; CHECK: div 206 ; CHECK: div
207 ; CHECK: div 207 ; CHECK: div
208 } 208 }
209 209
210 define <16 x i8> @test_sdiv_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 210 define internal <16 x i8> @test_sdiv_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
211 entry: 211 entry:
212 %res = sdiv <16 x i8> %arg0, %arg1 212 %res = sdiv <16 x i8> %arg0, %arg1
213 ret <16 x i8> %res 213 ret <16 x i8> %res
214 ; CHECK-LABEL: test_sdiv_v16i8 214 ; CHECK-LABEL: test_sdiv_v16i8
215 ; CHECK: idiv 215 ; CHECK: idiv
216 ; CHECK: idiv 216 ; CHECK: idiv
217 ; CHECK: idiv 217 ; CHECK: idiv
218 ; CHECK: idiv 218 ; CHECK: idiv
219 ; CHECK: idiv 219 ; CHECK: idiv
220 ; CHECK: idiv 220 ; CHECK: idiv
221 ; CHECK: idiv 221 ; CHECK: idiv
222 ; CHECK: idiv 222 ; CHECK: idiv
223 ; CHECK: idiv 223 ; CHECK: idiv
224 ; CHECK: idiv 224 ; CHECK: idiv
225 ; CHECK: idiv 225 ; CHECK: idiv
226 ; CHECK: idiv 226 ; CHECK: idiv
227 ; CHECK: idiv 227 ; CHECK: idiv
228 ; CHECK: idiv 228 ; CHECK: idiv
229 ; CHECK: idiv 229 ; CHECK: idiv
230 ; CHECK: idiv 230 ; CHECK: idiv
231 } 231 }
232 232
233 define <16 x i8> @test_urem_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 233 define internal <16 x i8> @test_urem_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
234 entry: 234 entry:
235 %res = urem <16 x i8> %arg0, %arg1 235 %res = urem <16 x i8> %arg0, %arg1
236 ret <16 x i8> %res 236 ret <16 x i8> %res
237 ; CHECK-LABEL: test_urem_v16i8 237 ; CHECK-LABEL: test_urem_v16i8
238 ; CHECK: div 238 ; CHECK: div
239 ; CHECK: div 239 ; CHECK: div
240 ; CHECK: div 240 ; CHECK: div
241 ; CHECK: div 241 ; CHECK: div
242 ; CHECK: div 242 ; CHECK: div
243 ; CHECK: div 243 ; CHECK: div
244 ; CHECK: div 244 ; CHECK: div
245 ; CHECK: div 245 ; CHECK: div
246 ; CHECK: div 246 ; CHECK: div
247 ; CHECK: div 247 ; CHECK: div
248 ; CHECK: div 248 ; CHECK: div
249 ; CHECK: div 249 ; CHECK: div
250 ; CHECK: div 250 ; CHECK: div
251 ; CHECK: div 251 ; CHECK: div
252 ; CHECK: div 252 ; CHECK: div
253 ; CHECK: div 253 ; CHECK: div
254 } 254 }
255 255
256 define <16 x i8> @test_srem_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) { 256 define internal <16 x i8> @test_srem_v16i8(<16 x i8> %arg0, <16 x i8> %arg1) {
257 entry: 257 entry:
258 %res = srem <16 x i8> %arg0, %arg1 258 %res = srem <16 x i8> %arg0, %arg1
259 ret <16 x i8> %res 259 ret <16 x i8> %res
260 ; CHECK-LABEL: test_srem_v16i8 260 ; CHECK-LABEL: test_srem_v16i8
261 ; CHECK: idiv 261 ; CHECK: idiv
262 ; CHECK: idiv 262 ; CHECK: idiv
263 ; CHECK: idiv 263 ; CHECK: idiv
264 ; CHECK: idiv 264 ; CHECK: idiv
265 ; CHECK: idiv 265 ; CHECK: idiv
266 ; CHECK: idiv 266 ; CHECK: idiv
267 ; CHECK: idiv 267 ; CHECK: idiv
268 ; CHECK: idiv 268 ; CHECK: idiv
269 ; CHECK: idiv 269 ; CHECK: idiv
270 ; CHECK: idiv 270 ; CHECK: idiv
271 ; CHECK: idiv 271 ; CHECK: idiv
272 ; CHECK: idiv 272 ; CHECK: idiv
273 ; CHECK: idiv 273 ; CHECK: idiv
274 ; CHECK: idiv 274 ; CHECK: idiv
275 ; CHECK: idiv 275 ; CHECK: idiv
276 ; CHECK: idiv 276 ; CHECK: idiv
277 } 277 }
278 278
279 define <8 x i16> @test_add_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 279 define internal <8 x i16> @test_add_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
280 entry: 280 entry:
281 %res = add <8 x i16> %arg0, %arg1 281 %res = add <8 x i16> %arg0, %arg1
282 ret <8 x i16> %res 282 ret <8 x i16> %res
283 ; CHECK-LABEL: test_add_v8i16 283 ; CHECK-LABEL: test_add_v8i16
284 ; CHECK: paddw 284 ; CHECK: paddw
285 } 285 }
286 286
287 define <8 x i16> @test_and_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 287 define internal <8 x i16> @test_and_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
288 entry: 288 entry:
289 %res = and <8 x i16> %arg0, %arg1 289 %res = and <8 x i16> %arg0, %arg1
290 ret <8 x i16> %res 290 ret <8 x i16> %res
291 ; CHECK-LABEL: test_and_v8i16 291 ; CHECK-LABEL: test_and_v8i16
292 ; CHECK: pand 292 ; CHECK: pand
293 } 293 }
294 294
295 define <8 x i16> @test_or_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 295 define internal <8 x i16> @test_or_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
296 entry: 296 entry:
297 %res = or <8 x i16> %arg0, %arg1 297 %res = or <8 x i16> %arg0, %arg1
298 ret <8 x i16> %res 298 ret <8 x i16> %res
299 ; CHECK-LABEL: test_or_v8i16 299 ; CHECK-LABEL: test_or_v8i16
300 ; CHECK: por 300 ; CHECK: por
301 } 301 }
302 302
303 define <8 x i16> @test_xor_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 303 define internal <8 x i16> @test_xor_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
304 entry: 304 entry:
305 %res = xor <8 x i16> %arg0, %arg1 305 %res = xor <8 x i16> %arg0, %arg1
306 ret <8 x i16> %res 306 ret <8 x i16> %res
307 ; CHECK-LABEL: test_xor_v8i16 307 ; CHECK-LABEL: test_xor_v8i16
308 ; CHECK: pxor 308 ; CHECK: pxor
309 } 309 }
310 310
311 define <8 x i16> @test_sub_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 311 define internal <8 x i16> @test_sub_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
312 entry: 312 entry:
313 %res = sub <8 x i16> %arg0, %arg1 313 %res = sub <8 x i16> %arg0, %arg1
314 ret <8 x i16> %res 314 ret <8 x i16> %res
315 ; CHECK-LABEL: test_sub_v8i16 315 ; CHECK-LABEL: test_sub_v8i16
316 ; CHECK: psubw 316 ; CHECK: psubw
317 } 317 }
318 318
319 define <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 319 define internal <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
320 entry: 320 entry:
321 %res = mul <8 x i16> %arg0, %arg1 321 %res = mul <8 x i16> %arg0, %arg1
322 ret <8 x i16> %res 322 ret <8 x i16> %res
323 ; CHECK-LABEL: test_mul_v8i16 323 ; CHECK-LABEL: test_mul_v8i16
324 ; CHECK: pmullw 324 ; CHECK: pmullw
325 } 325 }
326 326
327 define <8 x i16> @test_shl_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 327 define internal <8 x i16> @test_shl_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
328 entry: 328 entry:
329 %res = shl <8 x i16> %arg0, %arg1 329 %res = shl <8 x i16> %arg0, %arg1
330 ret <8 x i16> %res 330 ret <8 x i16> %res
331 ; CHECK-LABEL: test_shl_v8i16 331 ; CHECK-LABEL: test_shl_v8i16
332 ; CHECK: shl 332 ; CHECK: shl
333 ; CHECK: shl 333 ; CHECK: shl
334 ; CHECK: shl 334 ; CHECK: shl
335 ; CHECK: shl 335 ; CHECK: shl
336 ; CHECK: shl 336 ; CHECK: shl
337 ; CHECK: shl 337 ; CHECK: shl
338 ; CHECK: shl 338 ; CHECK: shl
339 ; CHECK: shl 339 ; CHECK: shl
340 } 340 }
341 341
342 define <8 x i16> @test_lshr_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 342 define internal <8 x i16> @test_lshr_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
343 entry: 343 entry:
344 %res = lshr <8 x i16> %arg0, %arg1 344 %res = lshr <8 x i16> %arg0, %arg1
345 ret <8 x i16> %res 345 ret <8 x i16> %res
346 ; CHECK-LABEL: test_lshr_v8i16 346 ; CHECK-LABEL: test_lshr_v8i16
347 ; CHECK: shr 347 ; CHECK: shr
348 ; CHECK: shr 348 ; CHECK: shr
349 ; CHECK: shr 349 ; CHECK: shr
350 ; CHECK: shr 350 ; CHECK: shr
351 ; CHECK: shr 351 ; CHECK: shr
352 ; CHECK: shr 352 ; CHECK: shr
353 ; CHECK: shr 353 ; CHECK: shr
354 ; CHECK: shr 354 ; CHECK: shr
355 } 355 }
356 356
357 define <8 x i16> @test_ashr_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 357 define internal <8 x i16> @test_ashr_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
358 entry: 358 entry:
359 %res = ashr <8 x i16> %arg0, %arg1 359 %res = ashr <8 x i16> %arg0, %arg1
360 ret <8 x i16> %res 360 ret <8 x i16> %res
361 ; CHECK-LABEL: test_ashr_v8i16 361 ; CHECK-LABEL: test_ashr_v8i16
362 ; CHECK: sar 362 ; CHECK: sar
363 ; CHECK: sar 363 ; CHECK: sar
364 ; CHECK: sar 364 ; CHECK: sar
365 ; CHECK: sar 365 ; CHECK: sar
366 ; CHECK: sar 366 ; CHECK: sar
367 ; CHECK: sar 367 ; CHECK: sar
368 ; CHECK: sar 368 ; CHECK: sar
369 ; CHECK: sar 369 ; CHECK: sar
370 } 370 }
371 371
372 define <8 x i16> @test_udiv_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 372 define internal <8 x i16> @test_udiv_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
373 entry: 373 entry:
374 %res = udiv <8 x i16> %arg0, %arg1 374 %res = udiv <8 x i16> %arg0, %arg1
375 ret <8 x i16> %res 375 ret <8 x i16> %res
376 ; CHECK-LABEL: test_udiv_v8i16 376 ; CHECK-LABEL: test_udiv_v8i16
377 ; CHECK: div 377 ; CHECK: div
378 ; CHECK: div 378 ; CHECK: div
379 ; CHECK: div 379 ; CHECK: div
380 ; CHECK: div 380 ; CHECK: div
381 ; CHECK: div 381 ; CHECK: div
382 ; CHECK: div 382 ; CHECK: div
383 ; CHECK: div 383 ; CHECK: div
384 ; CHECK: div 384 ; CHECK: div
385 } 385 }
386 386
387 define <8 x i16> @test_sdiv_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 387 define internal <8 x i16> @test_sdiv_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
388 entry: 388 entry:
389 %res = sdiv <8 x i16> %arg0, %arg1 389 %res = sdiv <8 x i16> %arg0, %arg1
390 ret <8 x i16> %res 390 ret <8 x i16> %res
391 ; CHECK-LABEL: test_sdiv_v8i16 391 ; CHECK-LABEL: test_sdiv_v8i16
392 ; CHECK: idiv 392 ; CHECK: idiv
393 ; CHECK: idiv 393 ; CHECK: idiv
394 ; CHECK: idiv 394 ; CHECK: idiv
395 ; CHECK: idiv 395 ; CHECK: idiv
396 ; CHECK: idiv 396 ; CHECK: idiv
397 ; CHECK: idiv 397 ; CHECK: idiv
398 ; CHECK: idiv 398 ; CHECK: idiv
399 ; CHECK: idiv 399 ; CHECK: idiv
400 } 400 }
401 401
402 define <8 x i16> @test_urem_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 402 define internal <8 x i16> @test_urem_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
403 entry: 403 entry:
404 %res = urem <8 x i16> %arg0, %arg1 404 %res = urem <8 x i16> %arg0, %arg1
405 ret <8 x i16> %res 405 ret <8 x i16> %res
406 ; CHECK-LABEL: test_urem_v8i16 406 ; CHECK-LABEL: test_urem_v8i16
407 ; CHECK: div 407 ; CHECK: div
408 ; CHECK: div 408 ; CHECK: div
409 ; CHECK: div 409 ; CHECK: div
410 ; CHECK: div 410 ; CHECK: div
411 ; CHECK: div 411 ; CHECK: div
412 ; CHECK: div 412 ; CHECK: div
413 ; CHECK: div 413 ; CHECK: div
414 ; CHECK: div 414 ; CHECK: div
415 } 415 }
416 416
417 define <8 x i16> @test_srem_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 417 define internal <8 x i16> @test_srem_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
418 entry: 418 entry:
419 %res = srem <8 x i16> %arg0, %arg1 419 %res = srem <8 x i16> %arg0, %arg1
420 ret <8 x i16> %res 420 ret <8 x i16> %res
421 ; CHECK-LABEL: test_srem_v8i16 421 ; CHECK-LABEL: test_srem_v8i16
422 ; CHECK: idiv 422 ; CHECK: idiv
423 ; CHECK: idiv 423 ; CHECK: idiv
424 ; CHECK: idiv 424 ; CHECK: idiv
425 ; CHECK: idiv 425 ; CHECK: idiv
426 ; CHECK: idiv 426 ; CHECK: idiv
427 ; CHECK: idiv 427 ; CHECK: idiv
428 ; CHECK: idiv 428 ; CHECK: idiv
429 ; CHECK: idiv 429 ; CHECK: idiv
430 } 430 }
431 431
432 define <4 x i32> @test_add_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 432 define internal <4 x i32> @test_add_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
433 entry: 433 entry:
434 %res = add <4 x i32> %arg0, %arg1 434 %res = add <4 x i32> %arg0, %arg1
435 ret <4 x i32> %res 435 ret <4 x i32> %res
436 ; CHECK-LABEL: test_add_v4i32 436 ; CHECK-LABEL: test_add_v4i32
437 ; CHECK: paddd 437 ; CHECK: paddd
438 } 438 }
439 439
440 define <4 x i32> @test_and_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 440 define internal <4 x i32> @test_and_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
441 entry: 441 entry:
442 %res = and <4 x i32> %arg0, %arg1 442 %res = and <4 x i32> %arg0, %arg1
443 ret <4 x i32> %res 443 ret <4 x i32> %res
444 ; CHECK-LABEL: test_and_v4i32 444 ; CHECK-LABEL: test_and_v4i32
445 ; CHECK: pand 445 ; CHECK: pand
446 } 446 }
447 447
448 define <4 x i32> @test_or_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 448 define internal <4 x i32> @test_or_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
449 entry: 449 entry:
450 %res = or <4 x i32> %arg0, %arg1 450 %res = or <4 x i32> %arg0, %arg1
451 ret <4 x i32> %res 451 ret <4 x i32> %res
452 ; CHECK-LABEL: test_or_v4i32 452 ; CHECK-LABEL: test_or_v4i32
453 ; CHECK: por 453 ; CHECK: por
454 } 454 }
455 455
456 define <4 x i32> @test_xor_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 456 define internal <4 x i32> @test_xor_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
457 entry: 457 entry:
458 %res = xor <4 x i32> %arg0, %arg1 458 %res = xor <4 x i32> %arg0, %arg1
459 ret <4 x i32> %res 459 ret <4 x i32> %res
460 ; CHECK-LABEL: test_xor_v4i32 460 ; CHECK-LABEL: test_xor_v4i32
461 ; CHECK: pxor 461 ; CHECK: pxor
462 } 462 }
463 463
464 define <4 x i32> @test_sub_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 464 define internal <4 x i32> @test_sub_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
465 entry: 465 entry:
466 %res = sub <4 x i32> %arg0, %arg1 466 %res = sub <4 x i32> %arg0, %arg1
467 ret <4 x i32> %res 467 ret <4 x i32> %res
468 ; CHECK-LABEL: test_sub_v4i32 468 ; CHECK-LABEL: test_sub_v4i32
469 ; CHECK: psubd 469 ; CHECK: psubd
470 } 470 }
471 471
472 define <4 x i32> @test_mul_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 472 define internal <4 x i32> @test_mul_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
473 entry: 473 entry:
474 %res = mul <4 x i32> %arg0, %arg1 474 %res = mul <4 x i32> %arg0, %arg1
475 ret <4 x i32> %res 475 ret <4 x i32> %res
476 ; CHECK-LABEL: test_mul_v4i32 476 ; CHECK-LABEL: test_mul_v4i32
477 ; CHECK: pmuludq 477 ; CHECK: pmuludq
478 ; CHECK: pmuludq 478 ; CHECK: pmuludq
479 ; 479 ;
480 ; SSE41-LABEL: test_mul_v4i32 480 ; SSE41-LABEL: test_mul_v4i32
481 ; SSE41: pmulld 481 ; SSE41: pmulld
482 } 482 }
483 483
484 define <4 x i32> @test_shl_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 484 define internal <4 x i32> @test_shl_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
485 entry: 485 entry:
486 %res = shl <4 x i32> %arg0, %arg1 486 %res = shl <4 x i32> %arg0, %arg1
487 ret <4 x i32> %res 487 ret <4 x i32> %res
488 ; CHECK-LABEL: test_shl_v4i32 488 ; CHECK-LABEL: test_shl_v4i32
489 ; CHECK: shl 489 ; CHECK: shl
490 ; CHECK: shl 490 ; CHECK: shl
491 ; CHECK: shl 491 ; CHECK: shl
492 ; CHECK: shl 492 ; CHECK: shl
493 493
494 ; This line is to ensure that pmulld is generated in test_mul_v4i32 above. 494 ; This line is to ensure that pmulld is generated in test_mul_v4i32 above.
495 ; SSE41-LABEL: test_shl_v4i32 495 ; SSE41-LABEL: test_shl_v4i32
496 } 496 }
497 497
498 define <4 x i32> @test_lshr_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 498 define internal <4 x i32> @test_lshr_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
499 entry: 499 entry:
500 %res = lshr <4 x i32> %arg0, %arg1 500 %res = lshr <4 x i32> %arg0, %arg1
501 ret <4 x i32> %res 501 ret <4 x i32> %res
502 ; CHECK-LABEL: test_lshr_v4i32 502 ; CHECK-LABEL: test_lshr_v4i32
503 ; CHECK: shr 503 ; CHECK: shr
504 ; CHECK: shr 504 ; CHECK: shr
505 ; CHECK: shr 505 ; CHECK: shr
506 ; CHECK: shr 506 ; CHECK: shr
507 } 507 }
508 508
509 define <4 x i32> @test_ashr_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 509 define internal <4 x i32> @test_ashr_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
510 entry: 510 entry:
511 %res = ashr <4 x i32> %arg0, %arg1 511 %res = ashr <4 x i32> %arg0, %arg1
512 ret <4 x i32> %res 512 ret <4 x i32> %res
513 ; CHECK-LABEL: test_ashr_v4i32 513 ; CHECK-LABEL: test_ashr_v4i32
514 ; CHECK: sar 514 ; CHECK: sar
515 ; CHECK: sar 515 ; CHECK: sar
516 ; CHECK: sar 516 ; CHECK: sar
517 ; CHECK: sar 517 ; CHECK: sar
518 } 518 }
519 519
520 define <4 x i32> @test_udiv_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 520 define internal <4 x i32> @test_udiv_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
521 entry: 521 entry:
522 %res = udiv <4 x i32> %arg0, %arg1 522 %res = udiv <4 x i32> %arg0, %arg1
523 ret <4 x i32> %res 523 ret <4 x i32> %res
524 ; CHECK-LABEL: test_udiv_v4i32 524 ; CHECK-LABEL: test_udiv_v4i32
525 ; CHECK: div 525 ; CHECK: div
526 ; CHECK: div 526 ; CHECK: div
527 ; CHECK: div 527 ; CHECK: div
528 ; CHECK: div 528 ; CHECK: div
529 } 529 }
530 530
531 define <4 x i32> @test_sdiv_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 531 define internal <4 x i32> @test_sdiv_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
532 entry: 532 entry:
533 %res = sdiv <4 x i32> %arg0, %arg1 533 %res = sdiv <4 x i32> %arg0, %arg1
534 ret <4 x i32> %res 534 ret <4 x i32> %res
535 ; CHECK-LABEL: test_sdiv_v4i32 535 ; CHECK-LABEL: test_sdiv_v4i32
536 ; CHECK: idiv 536 ; CHECK: idiv
537 ; CHECK: idiv 537 ; CHECK: idiv
538 ; CHECK: idiv 538 ; CHECK: idiv
539 ; CHECK: idiv 539 ; CHECK: idiv
540 } 540 }
541 541
542 define <4 x i32> @test_urem_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 542 define internal <4 x i32> @test_urem_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
543 entry: 543 entry:
544 %res = urem <4 x i32> %arg0, %arg1 544 %res = urem <4 x i32> %arg0, %arg1
545 ret <4 x i32> %res 545 ret <4 x i32> %res
546 ; CHECK-LABEL: test_urem_v4i32 546 ; CHECK-LABEL: test_urem_v4i32
547 ; CHECK: div 547 ; CHECK: div
548 ; CHECK: div 548 ; CHECK: div
549 ; CHECK: div 549 ; CHECK: div
550 ; CHECK: div 550 ; CHECK: div
551 } 551 }
552 552
553 define <4 x i32> @test_srem_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 553 define internal <4 x i32> @test_srem_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
554 entry: 554 entry:
555 %res = srem <4 x i32> %arg0, %arg1 555 %res = srem <4 x i32> %arg0, %arg1
556 ret <4 x i32> %res 556 ret <4 x i32> %res
557 ; CHECK-LABEL: test_srem_v4i32 557 ; CHECK-LABEL: test_srem_v4i32
558 ; CHECK: idiv 558 ; CHECK: idiv
559 ; CHECK: idiv 559 ; CHECK: idiv
560 ; CHECK: idiv 560 ; CHECK: idiv
561 ; CHECK: idiv 561 ; CHECK: idiv
562 } 562 }
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-arg.ll ('k') | tests_lit/llvm2ice_tests/vector-bitcast.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698