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