OSDN Git Service

* config/ia64/ia64.c (ia64_expand_vcondu_v2si): Generate proper
[pf3gnuchains/gcc-fork.git] / gcc / config / ia64 / vect.md
1 ;; IA-64 machine description for vector operations.
2 ;; Copyright (C) 2004, 2005
3 ;;
4 ;; This file is part of GCC.
5 ;;
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2, or (at your option)
9 ;; any later version.
10 ;;
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;; GNU General Public License for more details.
15 ;;
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING.  If not, write to
18 ;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19 ;; Boston, MA 02110-1301, USA.
20
21
22 ;; Integer vector operations
23
24 (define_mode_macro VECINT [V8QI V4HI V2SI])
25 (define_mode_macro VECINT12 [V8QI V4HI])
26 (define_mode_macro VECINT24 [V4HI V2SI])
27 (define_mode_attr vecsize [(V8QI "1") (V4HI "2") (V2SI "4")])
28
29 (define_expand "mov<mode>"
30   [(set (match_operand:VECINT 0 "general_operand" "")
31         (match_operand:VECINT 1 "general_operand" ""))]
32   ""
33 {
34   rtx op1 = ia64_expand_move (operands[0], operands[1]);
35   if (!op1)
36     DONE;
37   operands[1] = op1;
38 })
39
40 (define_insn "*mov<mode>_internal"
41   [(set (match_operand:VECINT 0 "destination_operand"
42                                         "=r,r,r,r,m ,*f ,*f,Q ,r ,*f")
43         (match_operand:VECINT 1 "move_operand"
44                                         "rU,W,i,m,rU,U*f,Q ,*f,*f,r "))]
45   "ia64_move_ok (operands[0], operands[1])"
46   "@
47    mov %0 = %r1
48    addl %0 = %v1, r0
49    movl %0 = %v1
50    ld8%O1 %0 = %1%P1
51    st8%Q0 %0 = %r1%P0
52    mov %0 = %F1
53    ldf8 %0 = %1%P1
54    stf8 %0 = %1%P0
55    getf.sig %0 = %1
56    setf.sig %0 = %1"
57   [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,fmisc,fld,stf,frfr,tofr")])
58
59 (define_insn "one_cmpl<mode>2"
60   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
61         (not:VECINT (match_operand:VECINT 1 "gr_register_operand" "r")))]
62   ""
63   "andcm %0 = -1, %1"
64   [(set_attr "itanium_class" "ilog")])
65
66 (define_insn "and<mode>3"
67   [(set (match_operand:VECINT 0 "grfr_register_operand" "=r,*f")
68         (and:VECINT
69           (match_operand:VECINT 1 "grfr_register_operand" "r,*f")
70           (match_operand:VECINT 2 "grfr_reg_or_8bit_operand" "r,*f")))]
71   ""
72   "@
73    and %0 = %2, %1
74    fand %0 = %2, %1"
75   [(set_attr "itanium_class" "ilog,fmisc")])
76
77 (define_insn "*andnot<mode>"
78   [(set (match_operand:VECINT 0 "grfr_register_operand" "=r,*f")
79         (and:VECINT
80           (not:VECINT (match_operand:VECINT 1 "grfr_register_operand" "r,*f"))
81           (match_operand:VECINT 2 "grfr_reg_or_8bit_operand" "r,*f")))]
82   ""
83   "@
84    andcm %0 = %2, %1
85    fandcm %0 = %2, %1"
86   [(set_attr "itanium_class" "ilog,fmisc")])
87
88 (define_insn "ior<mode>3"
89   [(set (match_operand:VECINT 0 "grfr_register_operand" "=r,*f")
90         (ior:VECINT
91           (match_operand:VECINT 1 "grfr_register_operand" "r,*f")
92           (match_operand:VECINT 2 "grfr_reg_or_8bit_operand" "r,*f")))]
93   ""
94   "@
95    or %0 = %2, %1
96    for %0 = %2, %1"
97   [(set_attr "itanium_class" "ilog,fmisc")])
98
99 (define_insn "xor<mode>3"
100   [(set (match_operand:VECINT 0 "grfr_register_operand" "=r,*f")
101         (xor:VECINT
102           (match_operand:VECINT 1 "grfr_register_operand" "r,*f")
103           (match_operand:VECINT 2 "grfr_reg_or_8bit_operand" "r,*f")))]
104   ""
105   "@
106    xor %0 = %2, %1
107    fxor %0 = %2, %1"
108   [(set_attr "itanium_class" "ilog,fmisc")])
109
110 (define_insn "neg<mode>2"
111   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
112         (neg:VECINT (match_operand:VECINT 1 "gr_register_operand" "r")))]
113   ""
114   "psub<vecsize> %0 = r0, %1"
115   [(set_attr "itanium_class" "mmalua")])
116
117 (define_insn "add<mode>3"
118   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
119         (plus:VECINT (match_operand:VECINT 1 "gr_register_operand" "r")
120                      (match_operand:VECINT 2 "gr_register_operand" "r")))]
121   ""
122   "padd<vecsize> %0 = %1, %2"
123   [(set_attr "itanium_class" "mmalua")])
124
125 (define_insn "*ssadd<mode>3"
126   [(set (match_operand:VECINT12 0 "gr_register_operand" "=r")
127         (ss_plus:VECINT12
128           (match_operand:VECINT12 1 "gr_register_operand" "r")
129           (match_operand:VECINT12 2 "gr_register_operand" "r")))]
130   ""
131   "padd<vecsize>.sss %0 = %1, %2"
132   [(set_attr "itanium_class" "mmalua")])
133
134 (define_insn "*usadd<mode>3"
135   [(set (match_operand:VECINT12 0 "gr_register_operand" "=r")
136         (us_plus:VECINT12
137           (match_operand:VECINT12 1 "gr_register_operand" "r")
138           (match_operand:VECINT12 2 "gr_register_operand" "r")))]
139   ""
140   "padd<vecsize>.uuu %0 = %1, %2"
141   [(set_attr "itanium_class" "mmalua")])
142
143 (define_insn "sub<mode>3"
144   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
145         (minus:VECINT (match_operand:VECINT 1 "gr_register_operand" "r")
146                       (match_operand:VECINT 2 "gr_register_operand" "r")))]
147   ""
148   "psub<vecsize> %0 = %1, %2"
149   [(set_attr "itanium_class" "mmalua")])
150
151 (define_insn "*sssub<mode>3"
152   [(set (match_operand:VECINT12 0 "gr_register_operand" "=r")
153         (ss_minus:VECINT12
154           (match_operand:VECINT12 1 "gr_register_operand" "r")
155           (match_operand:VECINT12 2 "gr_register_operand" "r")))]
156   ""
157   "psub<vecsize>.sss %0 = %1, %2"
158   [(set_attr "itanium_class" "mmalua")])
159
160 (define_insn "*ussub<mode>3"
161   [(set (match_operand:VECINT12 0 "gr_register_operand" "=r")
162         (us_minus:VECINT12
163           (match_operand:VECINT12 1 "gr_register_operand" "r")
164           (match_operand:VECINT12 2 "gr_register_operand" "r")))]
165   ""
166   "psub<vecsize>.uuu %0 = %1, %2"
167   [(set_attr "itanium_class" "mmalua")])
168
169 (define_expand "mulv8qi3"
170   [(set (match_operand:V8QI 0 "gr_register_operand" "")
171         (mult:V8QI (match_operand:V8QI 1 "gr_register_operand" "r")
172                    (match_operand:V8QI 2 "gr_register_operand" "r")))]
173   ""
174 {
175   rtx r1, l1, r2, l2, rm, lm;
176
177   r1 = gen_reg_rtx (V4HImode);
178   l1 = gen_reg_rtx (V4HImode);
179   r2 = gen_reg_rtx (V4HImode);
180   l2 = gen_reg_rtx (V4HImode);
181
182   /* Zero-extend the QImode elements into two words of HImode elements
183      by interleaving them with zero bytes.  */
184   emit_insn (gen_mix1_r (gen_lowpart (V8QImode, r1),
185                          operands[1], CONST0_RTX (V8QImode)));
186   emit_insn (gen_mix1_r (gen_lowpart (V8QImode, r2),
187                          operands[2], CONST0_RTX (V8QImode)));
188   emit_insn (gen_mix1_l (gen_lowpart (V8QImode, l1),
189                          operands[1], CONST0_RTX (V8QImode)));
190   emit_insn (gen_mix1_l (gen_lowpart (V8QImode, l2),
191                          operands[2], CONST0_RTX (V8QImode)));
192
193   /* Multiply.  */
194   rm = gen_reg_rtx (V4HImode);
195   lm = gen_reg_rtx (V4HImode);
196   emit_insn (gen_mulv4hi3 (rm, r1, r2));
197   emit_insn (gen_mulv4hi3 (lm, l1, l2));
198
199   /* Zap the high order bytes of the HImode elements by overwriting those
200      in one part with the low order bytes of the other.  */
201   emit_insn (gen_mix1_r (operands[0],
202                          gen_lowpart (V8QImode, rm),
203                          gen_lowpart (V8QImode, lm)));
204   DONE;
205 })
206
207 (define_insn "mulv4hi3"
208   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
209         (mult:V4HI (match_operand:V4HI 1 "gr_register_operand" "r")
210                    (match_operand:V4HI 2 "gr_register_operand" "r")))]
211   ""
212   "pmpyshr2 %0 = %1, %2, 0"
213   [(set_attr "itanium_class" "mmmul")])
214
215 (define_expand "umax<mode>3"
216   [(set (match_operand:VECINT 0 "gr_register_operand" "")
217         (umax:VECINT (match_operand:VECINT 1 "gr_register_operand" "")
218                      (match_operand:VECINT 2 "gr_register_operand" "")))]
219   ""
220 {
221   if (ia64_expand_vecint_minmax (UMAX, <MODE>mode, operands))
222     DONE;
223 })
224
225 (define_expand "smax<mode>3"
226   [(set (match_operand:VECINT 0 "gr_register_operand" "")
227         (smax:VECINT (match_operand:VECINT 1 "gr_reg_or_0_operand" "")
228                      (match_operand:VECINT 2 "gr_reg_or_0_operand" "")))]
229   ""
230 {
231   if (ia64_expand_vecint_minmax (SMAX, <MODE>mode, operands))
232     DONE;
233 })
234
235 (define_expand "umin<mode>3"
236   [(set (match_operand:VECINT 0 "gr_register_operand" "")
237         (umin:VECINT (match_operand:VECINT 1 "gr_register_operand" "")
238                      (match_operand:VECINT 2 "gr_register_operand" "")))]
239   ""
240 {
241   if (ia64_expand_vecint_minmax (UMIN, <MODE>mode, operands))
242     DONE;
243 })
244
245 (define_expand "smin<mode>3"
246   [(set (match_operand:VECINT 0 "gr_register_operand" "")
247         (smin:VECINT (match_operand:VECINT 1 "gr_reg_or_0_operand" "")
248                      (match_operand:VECINT 2 "gr_reg_or_0_operand" "")))]
249   ""
250 {
251   if (ia64_expand_vecint_minmax (SMIN, <MODE>mode, operands))
252     DONE;
253 })
254
255 (define_insn "*umaxv8qi3"
256   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
257         (umax:V8QI (match_operand:V8QI 1 "gr_register_operand" "r")
258                    (match_operand:V8QI 2 "gr_register_operand" "r")))]
259   ""
260   "pmax1.u %0 = %1, %2"
261   [(set_attr "itanium_class" "mmshf")])
262
263 (define_insn "*smaxv4hi3"
264   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
265         (smax:V4HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
266                    (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")))]
267   ""
268   "pmax2 %0 = %r1, %r2"
269   [(set_attr "itanium_class" "mmshf")])
270
271 (define_insn "*uminv8qi3"
272   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
273         (umin:V8QI (match_operand:V8QI 1 "gr_register_operand" "r")
274                    (match_operand:V8QI 2 "gr_register_operand" "r")))]
275   ""
276   "pmin1.u %0 = %1, %2"
277   [(set_attr "itanium_class" "mmshf")])
278
279 (define_insn "*sminv4hi3"
280   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
281         (smin:V4HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
282                    (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")))]
283   ""
284   "pmin2 %0 = %r1, %r2"
285   [(set_attr "itanium_class" "mmshf")])
286
287 (define_insn "ashl<mode>3"
288   [(set (match_operand:VECINT24 0 "gr_register_operand" "=r")
289         (ashift:VECINT24
290           (match_operand:VECINT24 1 "gr_register_operand" "r")
291           (match_operand:VECINT24 2 "gr_reg_or_5bit_operand" "rn")))]
292   ""
293   "pshl<vecsize> %0 = %1, %2"
294   [(set_attr "itanium_class" "mmshf")])
295
296 (define_insn "ashr<mode>3"
297   [(set (match_operand:VECINT24 0 "gr_register_operand" "=r")
298         (ashiftrt:VECINT24
299           (match_operand:VECINT24 1 "gr_register_operand" "r")
300           (match_operand:VECINT24 2 "gr_reg_or_5bit_operand" "rn")))]
301   ""
302   "pshr<vecsize> %0 = %1, %2"
303   [(set_attr "itanium_class" "mmshf")])
304
305 (define_insn "lshr<mode>3"
306   [(set (match_operand:VECINT24 0 "gr_register_operand" "=r")
307         (lshiftrt:VECINT24
308           (match_operand:VECINT24 1 "gr_register_operand" "r")
309           (match_operand:VECINT24 2 "gr_reg_or_5bit_operand" "rn")))]
310   ""
311   "pshr<vecsize>.u %0 = %1, %2"
312   [(set_attr "itanium_class" "mmshf")])
313
314 (define_expand "vec_shl_<mode>"
315   [(set (match_operand:VECINT 0 "gr_register_operand" "")
316         (ashift:DI (match_operand:VECINT 1 "gr_register_operand" "")
317                    (match_operand:DI 2 "gr_reg_or_6bit_operand" "")))]
318   ""
319 {
320   operands[0] = gen_lowpart (DImode, operands[0]);
321   operands[1] = gen_lowpart (DImode, operands[1]);
322 })
323
324 (define_expand "vec_shr_<mode>"
325   [(set (match_operand:VECINT 0 "gr_register_operand" "")
326         (lshiftrt:DI (match_operand:VECINT 1 "gr_register_operand" "")
327                      (match_operand:DI 2 "gr_reg_or_6bit_operand" "")))]
328   ""
329 {
330   operands[0] = gen_lowpart (DImode, operands[0]);
331   operands[1] = gen_lowpart (DImode, operands[1]);
332 })
333
334 (define_expand "vcond<mode>"
335   [(set (match_operand:VECINT 0 "gr_register_operand" "")
336         (if_then_else:VECINT
337           (match_operator 3 "" 
338             [(match_operand:VECINT 4 "gr_reg_or_0_operand" "")
339              (match_operand:VECINT 5 "gr_reg_or_0_operand" "")])
340           (match_operand:VECINT 1 "gr_reg_or_0_operand" "")
341           (match_operand:VECINT 2 "gr_reg_or_0_operand" "")))]
342   ""
343 {
344   ia64_expand_vecint_cmov (operands);
345   DONE;
346 })
347
348 (define_expand "vcondu<mode>"
349   [(set (match_operand:VECINT 0 "gr_register_operand" "")
350         (if_then_else:VECINT
351           (match_operator 3 "" 
352             [(match_operand:VECINT 4 "gr_reg_or_0_operand" "")
353              (match_operand:VECINT 5 "gr_reg_or_0_operand" "")])
354           (match_operand:VECINT 1 "gr_reg_or_0_operand" "")
355           (match_operand:VECINT 2 "gr_reg_or_0_operand" "")))]
356   ""
357 {
358   ia64_expand_vecint_cmov (operands);
359   DONE;
360 })
361
362 (define_insn "*cmpeq_<mode>"
363   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
364         (eq:VECINT (match_operand:VECINT 1 "gr_reg_or_0_operand" "rU")
365                    (match_operand:VECINT 2 "gr_reg_or_0_operand" "rU")))]
366   ""
367   "pcmp<vecsize>.eq %0 = %r1, %r2"
368   [(set_attr "itanium_class" "mmalua")])
369
370 (define_insn "*cmpgt_<mode>"
371   [(set (match_operand:VECINT 0 "gr_register_operand" "=r")
372         (gt:VECINT (match_operand:VECINT 1 "gr_reg_or_0_operand" "rU")
373                    (match_operand:VECINT 2 "gr_reg_or_0_operand" "rU")))]
374   ""
375   "pcmp<vecsize>.gt %0 = %r1, %r2"
376   [(set_attr "itanium_class" "mmalua")])
377
378 (define_insn "pack2_sss"
379   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
380         (vec_concat:V8QI
381           (ss_truncate:V4QI
382             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU"))
383           (ss_truncate:V4QI
384             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))))]
385   ""
386   "pack2.sss %0 = %r1, %r2"
387   [(set_attr "itanium_class" "mmshf")])
388
389 (define_insn "*pack2_uss"
390   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
391         (vec_concat:V8QI
392           (us_truncate:V4QI
393             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU"))
394           (us_truncate:V4QI
395             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))))]
396   ""
397   "pack2.uss %0 = %r1, %r2"
398   [(set_attr "itanium_class" "mmshf")])
399
400 (define_insn "pack4_sss"
401   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
402         (vec_concat:V4HI
403           (ss_truncate:V2HI
404             (match_operand:V2SI 1 "gr_reg_or_0_operand" "rU"))
405           (ss_truncate:V2HI
406             (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU"))))]
407   ""
408   "pack4.sss %0 = %r1, %r2"
409   [(set_attr "itanium_class" "mmshf")])
410
411 (define_insn "unpack1_l"
412   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
413         (vec_select:V8QI
414           (vec_concat:V16QI
415             (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU")
416             (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU"))
417           (parallel [(const_int 0)
418                      (const_int 1)
419                      (const_int 2)
420                      (const_int 3)
421                      (const_int 8)
422                      (const_int 9)
423                      (const_int 10)
424                      (const_int 11)])))]
425   ""
426   "unpack1.l %0 = %r2, %r1"
427   [(set_attr "itanium_class" "mmshf")])
428
429 (define_insn "unpack1_h"
430   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
431         (vec_select:V8QI
432           (vec_concat:V16QI
433             (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU")
434             (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU"))
435           (parallel [(const_int 4)
436                      (const_int 5)
437                      (const_int 6)
438                      (const_int 7)
439                      (const_int 12)
440                      (const_int 13)
441                      (const_int 14)
442                      (const_int 15)])))]
443   ""
444   "unpack1.h %0 = %r2, %r1"
445   [(set_attr "itanium_class" "mmshf")])
446
447 (define_insn "mix1_r"
448   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
449         (vec_select:V8QI
450           (vec_concat:V16QI
451             (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU")
452             (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU"))
453           (parallel [(const_int 0)
454                      (const_int 8)
455                      (const_int 2)
456                      (const_int 10)
457                      (const_int 4)
458                      (const_int 12)
459                      (const_int 6)
460                      (const_int 14)])))]
461   ""
462   "mix1.r %0 = %r2, %r1"
463   [(set_attr "itanium_class" "mmshf")])
464
465 (define_insn "mix1_l"
466   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
467         (vec_select:V8QI
468           (vec_concat:V16QI
469             (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU")
470             (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU"))
471           (parallel [(const_int 1)
472                      (const_int 9)
473                      (const_int 3)
474                      (const_int 11)
475                      (const_int 5)
476                      (const_int 13)
477                      (const_int 7)
478                      (const_int 15)])))]
479   ""
480   "mix1.l %0 = %r2, %r1"
481   [(set_attr "itanium_class" "mmshf")])
482
483 (define_insn "*mux1_rev"
484   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
485         (vec_select:V8QI
486           (match_operand:V8QI 1 "gr_register_operand" "r")
487           (parallel [(const_int 7)
488                      (const_int 6)
489                      (const_int 5)
490                      (const_int 4)
491                      (const_int 3)
492                      (const_int 2)
493                      (const_int 1)
494                      (const_int 0)])))]
495   ""
496   "mux1 %0 = %1, @rev"
497   [(set_attr "itanium_class" "mmshf")])
498
499 (define_insn "*mux1_mix"
500   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
501         (vec_select:V8QI
502           (match_operand:V8QI 1 "gr_register_operand" "r")
503           (parallel [(const_int 0)
504                      (const_int 4)
505                      (const_int 2)
506                      (const_int 6)
507                      (const_int 1)
508                      (const_int 5)
509                      (const_int 3)
510                      (const_int 7)])))]
511   ""
512   "mux1 %0 = %1, @mix"
513   [(set_attr "itanium_class" "mmshf")])
514
515 (define_insn "*mux1_shuf"
516   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
517         (vec_select:V8QI
518           (match_operand:V8QI 1 "gr_register_operand" "r")
519           (parallel [(const_int 0)
520                      (const_int 4)
521                      (const_int 1)
522                      (const_int 5)
523                      (const_int 2)
524                      (const_int 6)
525                      (const_int 3)
526                      (const_int 7)])))]
527   ""
528   "mux1 %0 = %1, @shuf"
529   [(set_attr "itanium_class" "mmshf")])
530
531 (define_insn "*mux1_alt"
532   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
533         (vec_select:V8QI
534           (match_operand:V8QI 1 "gr_register_operand" "r")
535           (parallel [(const_int 0)
536                      (const_int 2)
537                      (const_int 4)
538                      (const_int 6)
539                      (const_int 1)
540                      (const_int 3)
541                      (const_int 5)
542                      (const_int 7)])))]
543   ""
544   "mux1 %0 = %1, @alt"
545   [(set_attr "itanium_class" "mmshf")])
546
547 (define_insn "*mux1_brcst_v8qi"
548   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
549         (vec_select:V8QI
550           (match_operand:V8QI 1 "gr_register_operand" "r")
551           (parallel [(const_int 0)
552                      (const_int 0)
553                      (const_int 0)
554                      (const_int 0)
555                      (const_int 0)
556                      (const_int 0)
557                      (const_int 0)
558                      (const_int 0)])))]
559   ""
560   "mux1 %0 = %1, @brcst"
561   [(set_attr "itanium_class" "mmshf")])
562
563 (define_insn "*mux1_brcst_qi"
564   [(set (match_operand:V8QI 0 "gr_register_operand" "=r")
565         (vec_duplicate:V8QI
566           (match_operand:QI 1 "gr_register_operand" "r")))]
567   ""
568   "mux1 %0 = %1, @brcst"
569   [(set_attr "itanium_class" "mmshf")])
570
571 (define_insn "unpack2_l"
572   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
573         (vec_select:V4HI
574           (vec_concat:V8HI
575             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
576             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))
577           (parallel [(const_int 0)
578                      (const_int 4)
579                      (const_int 1)
580                      (const_int 5)])))]
581   ""
582   "unpack2.l %0 = %r2, %r1"
583   [(set_attr "itanium_class" "mmshf")])
584
585 (define_insn "unpack2_h"
586   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
587         (vec_select:V4HI
588           (vec_concat:V8HI
589             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
590             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))
591           (parallel [(const_int 2)
592                      (const_int 6)
593                      (const_int 3)
594                      (const_int 7)])))]
595   ""
596   "unpack2.h %0 = %r2, %r1"
597   [(set_attr "itanium_class" "mmshf")])
598
599 (define_insn "*mix2_r"
600   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
601         (vec_select:V4HI
602           (vec_concat:V8HI
603             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
604             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))
605           (parallel [(const_int 0)
606                      (const_int 4)
607                      (const_int 2)
608                      (const_int 6)])))]
609   ""
610   "mix2.r %0 = %r2, %r1"
611   [(set_attr "itanium_class" "mmshf")])
612
613 (define_insn "*mix2_l"
614   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
615         (vec_select:V4HI
616           (vec_concat:V8HI
617             (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU")
618             (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))
619           (parallel [(const_int 1)
620                      (const_int 5)
621                      (const_int 3)
622                      (const_int 7)])))]
623   ""
624   "mix2.l %0 = %r2, %r1"
625   [(set_attr "itanium_class" "mmshf")])
626
627 (define_insn "*mux2"
628   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
629         (vec_select:V4HI
630           (match_operand:V4HI 1 "gr_register_operand" "r")
631           (parallel [(match_operand 2 "const_int_2bit_operand" "")
632                      (match_operand 3 "const_int_2bit_operand" "")
633                      (match_operand 4 "const_int_2bit_operand" "")
634                      (match_operand 5 "const_int_2bit_operand" "")])))]
635   ""
636 {
637   int mask;
638   mask  = INTVAL (operands[2]);
639   mask |= INTVAL (operands[3]) << 2;
640   mask |= INTVAL (operands[4]) << 4;
641   mask |= INTVAL (operands[5]) << 6;
642   operands[2] = GEN_INT (mask);
643   return "%,mux2 %0 = %1, %2";
644 }
645   [(set_attr "itanium_class" "mmshf")])
646
647 (define_insn "*mux2_brcst_hi"
648   [(set (match_operand:V4HI 0 "gr_register_operand" "=r")
649         (vec_duplicate:V4HI
650           (match_operand:HI 1 "gr_register_operand" "r")))]
651   ""
652   "mux2 %0 = %1, 0"
653   [(set_attr "itanium_class" "mmshf")])
654
655 ;; Note that mix4.r performs the exact same operation.
656 (define_insn "*unpack4_l"
657   [(set (match_operand:V2SI 0 "gr_register_operand" "=r")
658         (vec_select:V2SI
659           (vec_concat:V4SI
660             (match_operand:V2SI 1 "gr_reg_or_0_operand" "rU")
661             (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU"))
662           (parallel [(const_int 0)
663                      (const_int 2)])))]
664   ""
665   "unpack4.l %0 = %r2, %r1"
666   [(set_attr "itanium_class" "mmshf")])
667
668 ;; Note that mix4.l performs the exact same operation.
669 (define_insn "*unpack4_h"
670   [(set (match_operand:V2SI 0 "gr_register_operand" "=r")
671         (vec_select:V2SI
672           (vec_concat:V4SI
673             (match_operand:V2SI 1 "gr_reg_or_0_operand" "rU")
674             (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU"))
675           (parallel [(const_int 1)
676                      (const_int 3)])))]
677   ""
678   "unpack4.h %0 = %r2, %r1"
679   [(set_attr "itanium_class" "mmshf")])
680
681 (define_expand "vec_initv2si"
682   [(match_operand:V2SF 0 "gr_register_operand" "")
683    (match_operand 1 "" "")]
684   ""
685 {
686   rtx op1 = XVECEXP (operands[1], 0, 0);
687   rtx op2 = XVECEXP (operands[1], 0, 1);
688   rtx x;
689
690   if (GET_CODE (op1) == CONST_INT && GET_CODE (op2) == CONST_INT)
691     {
692       x = gen_rtx_CONST_VECTOR (V2SImode, XVEC (operands[1], 0));
693       emit_move_insn (operands[0], x);
694       DONE;
695     }
696
697   if (!gr_reg_or_0_operand (op1, SImode))
698     op1 = force_reg (SImode, op1);
699   if (!gr_reg_or_0_operand (op2, SImode))
700     op2 = force_reg (SImode, op2);
701
702   x = gen_rtx_VEC_CONCAT (V2SImode, op1, op2);
703   emit_insn (gen_rtx_SET (VOIDmode, operands[0], x));
704   DONE;
705 })
706
707 (define_insn "*vecinit_v2si"
708   [(set (match_operand:V2SI 0 "gr_register_operand" "=r")
709         (vec_concat:V2SI
710           (match_operand:SI 1 "gr_reg_or_0_operand" "rO")
711           (match_operand:SI 2 "gr_reg_or_0_operand" "rO")))]
712   ""
713   "unpack4.l %0 = %r2, %r1"
714   [(set_attr "itanium_class" "mmshf")])
715
716 ;; Missing operations
717 ;; padd.uus
718 ;; pavg
719 ;; pavgsub
720 ;; pmpy
721 ;; pmpyshr, general form
722 ;; psad
723 ;; pshladd
724 ;; pshradd
725 ;; psub.uus
726 ;; vec_set<mode>
727 ;; vec_extract<mode>
728 ;; vec_init<mode>
729 \f
730 ;; Floating point vector operations
731
732 (define_expand "movv2sf"
733   [(set (match_operand:V2SF 0 "general_operand" "")
734         (match_operand:V2SF 1 "general_operand" ""))]
735   ""
736 {
737   rtx op1 = ia64_expand_move (operands[0], operands[1]);
738   if (!op1)
739     DONE;
740   operands[1] = op1;
741 })
742
743 (define_insn "*movv2sf_internal"
744   [(set (match_operand:V2SF 0 "destination_operand"
745                                         "=f,f,f,Q,*r ,*r,*r,*r,m ,f ,*r")
746         (match_operand:V2SF 1 "move_operand"
747                                         "fU,Y,Q,f,U*r,W ,i ,m ,*r,*r,f "))]
748   "ia64_move_ok (operands[0], operands[1])"
749 {
750   static const char * const alt[] = {
751     "%,mov %0 = %F1",
752     "%,fpack %0 = %F2, %F1",
753     "%,ldf8 %0 = %1%P1",
754     "%,stf8 %0 = %1%P0",
755     "%,mov %0 = %r1",
756     "%,addl %0 = %v1, r0",
757     "%,movl %0 = %v1",
758     "%,ld8%O1 %0 = %1%P1",
759     "%,st8%Q0 %0 = %r1%P0",
760     "%,setf.sig %0 = %1",
761     "%,getf.sig %0 = %1"
762   };
763
764   if (which_alternative == 1)
765     {
766       operands[2] = XVECEXP (operands[1], 0, 1);
767       operands[1] = XVECEXP (operands[1], 0, 0);
768     }
769
770   return alt[which_alternative];
771 }
772   [(set_attr "itanium_class" "fmisc,fmisc,fld,stf,ialu,ialu,long_i,ld,st,tofr,frfr")])
773
774 (define_insn "absv2sf2"
775   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
776         (abs:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")))]
777   ""
778   "fpabs %0 = %1"
779   [(set_attr "itanium_class" "fmisc")])
780
781 (define_insn "negv2sf2"
782   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
783         (neg:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")))]
784   ""
785   "fpneg %0 = %1"
786   [(set_attr "itanium_class" "fmisc")])
787
788 (define_insn "*negabsv2sf2"
789   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
790         (neg:V2SF
791           (abs:V2SF (match_operand:V2SF 1 "fr_register_operand" "f"))))]
792   ""
793   "fpnegabs %0 = %1"
794   [(set_attr "itanium_class" "fmisc")])
795
796 (define_expand "addv2sf3"
797   [(set (match_operand:V2SF 0 "fr_register_operand" "")
798         (plus:V2SF
799           (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "")
800                      (match_dup 3))
801           (match_operand:V2SF 2 "fr_register_operand" "")))]
802   ""
803 {
804   rtvec v = gen_rtvec (2, CONST1_RTX (SFmode), CONST1_RTX (SFmode));
805   operands[3] = force_reg (V2SFmode, gen_rtx_CONST_VECTOR (V2SFmode, v));
806 })
807
808 (define_expand "subv2sf3"
809   [(set (match_operand:V2SF 0 "fr_register_operand" "")
810         (minus:V2SF
811           (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "")
812                      (match_dup 3))
813           (match_operand:V2SF 2 "fr_register_operand" "")))]
814   ""
815 {
816   rtvec v = gen_rtvec (2, CONST1_RTX (SFmode), CONST1_RTX (SFmode));
817   operands[3] = force_reg (V2SFmode, gen_rtx_CONST_VECTOR (V2SFmode, v));
818 })
819
820 (define_insn "mulv2sf3"
821   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
822         (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
823                    (match_operand:V2SF 2 "fr_register_operand" "f")))]
824   ""
825   "fpmpy %0 = %1, %2"
826   [(set_attr "itanium_class" "fmac")])
827
828 (define_insn "*fpma"
829   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
830         (plus:V2SF
831           (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
832                      (match_operand:V2SF 2 "fr_register_operand" "f"))
833           (match_operand:V2SF 3 "fr_register_operand" "f")))]
834   ""
835   "fpma %0 = %1, %2, %3"
836   [(set_attr "itanium_class" "fmac")])
837
838 (define_insn "*fpms"
839   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
840         (minus:V2SF
841           (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
842                      (match_operand:V2SF 2 "fr_register_operand" "f"))
843           (match_operand:V2SF 3 "fr_register_operand" "f")))]
844   ""
845   "fpms %0 = %1, %2, %3"
846   [(set_attr "itanium_class" "fmac")])
847
848 (define_insn "*fpnmpy"
849   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
850         (neg:V2SF
851           (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
852                      (match_operand:V2SF 2 "fr_register_operand" "f"))))]
853   ""
854   "fpnmpy %0 = %1, %2"
855   [(set_attr "itanium_class" "fmac")])
856
857 (define_insn "*fpnma"
858   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
859         (plus:V2SF
860           (neg:V2SF
861             (mult:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
862                        (match_operand:V2SF 2 "fr_register_operand" "f")))
863           (match_operand:V2SF 3 "fr_register_operand" "f")))]
864   ""
865   "fpnma %0 = %1, %2, %3"
866   [(set_attr "itanium_class" "fmac")])
867
868 (define_insn "smaxv2sf3"
869   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
870         (smax:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
871                    (match_operand:V2SF 2 "fr_register_operand" "f")))]
872   ""
873   "fpmax %0 = %1, %2"
874   [(set_attr "itanium_class" "fmisc")])
875
876 (define_insn "sminv2sf3"
877   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
878         (smin:V2SF (match_operand:V2SF 1 "fr_register_operand" "f")
879                    (match_operand:V2SF 2 "fr_register_operand" "f")))]
880   ""
881   "fpmin %0 = %1, %2"
882   [(set_attr "itanium_class" "fmisc")])
883
884 (define_expand "reduc_plus_v2sf"
885   [(match_operand:V2SF 0 "fr_register_operand" "")
886    (match_operand:V2SF 1 "fr_register_operand" "")]
887   ""
888 {
889   rtx tmp = gen_reg_rtx (V2SFmode);
890   emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode)));
891   emit_insn (gen_addv2sf3 (operands[0], operands[1], tmp));
892   DONE;
893 })
894
895 (define_expand "reduc_smax_v2sf"
896   [(match_operand:V2SF 0 "fr_register_operand" "")
897    (match_operand:V2SF 1 "fr_register_operand" "")]
898   ""
899 {
900   rtx tmp = gen_reg_rtx (V2SFmode);
901   emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode)));
902   emit_insn (gen_smaxv2sf3 (operands[0], operands[1], tmp));
903   DONE;
904 })
905
906 (define_expand "reduc_smin_v2sf"
907   [(match_operand:V2SF 0 "fr_register_operand" "")
908    (match_operand:V2SF 1 "fr_register_operand" "")]
909   ""
910 {
911   rtx tmp = gen_reg_rtx (V2SFmode);
912   emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode)));
913   emit_insn (gen_sminv2sf3 (operands[0], operands[1], tmp));
914   DONE;
915 })
916
917 (define_expand "vcondv2sf"
918   [(set (match_operand:V2SF 0 "fr_register_operand" "")
919         (if_then_else:V2SF
920           (match_operator 3 "" 
921             [(match_operand:V2SF 4 "fr_reg_or_0_operand" "")
922              (match_operand:V2SF 5 "fr_reg_or_0_operand" "")])
923           (match_operand:V2SF 1 "fr_reg_or_0_operand" "")
924           (match_operand:V2SF 2 "fr_reg_or_0_operand" "")))]
925   ""
926 {
927   rtx x, cmp;
928
929   cmp = gen_reg_rtx (V2SFmode);
930   PUT_MODE (operands[3], V2SFmode);
931   emit_insn (gen_rtx_SET (VOIDmode, cmp, operands[3]));
932
933   x = gen_rtx_IF_THEN_ELSE (V2SFmode, cmp, operands[1], operands[2]);
934   emit_insn (gen_rtx_SET (VOIDmode, operands[0], x));
935   DONE;
936 })
937
938 (define_insn "*fpcmp"
939   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
940         (match_operator:V2SF 3 "comparison_operator"
941           [(match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
942            (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")]))]
943   ""
944   "fpcmp.%D3 %0 = %F1, %F2"
945   [(set_attr "itanium_class" "fmisc")])
946
947 (define_insn "*fselect"
948   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
949         (if_then_else:V2SF
950           (match_operand:V2SF 1 "fr_register_operand" "f")
951           (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")
952           (match_operand:V2SF 3 "fr_reg_or_0_operand" "fU")))]
953   ""
954   "fselect %0 = %F2, %F3, %1"
955   [(set_attr "itanium_class" "fmisc")])
956
957 (define_expand "vec_initv2sf"
958   [(match_operand:V2SF 0 "fr_register_operand" "")
959    (match_operand 1 "" "")]
960   ""
961 {
962   rtx op1 = XVECEXP (operands[1], 0, 0);
963   rtx op2 = XVECEXP (operands[1], 0, 1);
964   rtx x;
965
966   if (GET_CODE (op1) == CONST_DOUBLE && GET_CODE (op2) == CONST_DOUBLE)
967     {
968       x = gen_rtx_CONST_VECTOR (V2SFmode, XVEC (operands[1], 0));
969       emit_move_insn (operands[0], x);
970       DONE;
971     }
972
973   if (!fr_reg_or_fp01_operand (op1, SFmode))
974     op1 = force_reg (SFmode, op1);
975   if (!fr_reg_or_fp01_operand (op2, SFmode))
976     op2 = force_reg (SFmode, op2);
977
978   emit_insn (gen_fpack (operands[0], op1, op2));
979   DONE;
980 })
981
982 (define_insn "fpack"
983   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
984         (vec_concat:V2SF
985           (match_operand:SF 1 "fr_reg_or_fp01_operand" "fG")
986           (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))]
987   ""
988   "fpack %0 = %F2, %F1"
989   [(set_attr "itanium_class" "fmisc")])
990
991 (define_insn "fswap"
992   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
993         (vec_select:V2SF
994           (vec_concat:V4SF
995             (match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
996             (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU"))
997           (parallel [(const_int 1) (const_int 2)])))]
998   ""
999   "fswap %0 = %F1, %F2"
1000   [(set_attr "itanium_class" "fmisc")])
1001
1002 (define_insn "*fmix_l"
1003   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
1004         (vec_select:V2SF
1005           (vec_concat:V4SF
1006             (match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
1007             (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU"))
1008           (parallel [(const_int 1) (const_int 3)])))]
1009   ""
1010   "fmix.l %0 = %F2, %F1"
1011   [(set_attr "itanium_class" "fmisc")])
1012
1013 (define_insn "fmix_r"
1014   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
1015         (vec_select:V2SF
1016           (vec_concat:V4SF
1017             (match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
1018             (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU"))
1019           (parallel [(const_int 0) (const_int 2)])))]
1020   ""
1021   "fmix.r %0 = %F2, %F1"
1022   [(set_attr "itanium_class" "fmisc")])
1023
1024 (define_insn "fmix_lr"
1025   [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
1026         (vec_select:V2SF
1027           (vec_concat:V4SF
1028             (match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
1029             (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU"))
1030           (parallel [(const_int 0) (const_int 3)])))]
1031   ""
1032   "fmix.lr %0 = %F2, %F1"
1033   [(set_attr "itanium_class" "fmisc")])
1034
1035 (define_expand "vec_setv2sf"
1036   [(match_operand:V2SF 0 "fr_register_operand" "")
1037    (match_operand:SF 1 "fr_register_operand" "")
1038    (match_operand 2 "const_int_operand" "")]
1039   ""
1040 {
1041   rtx tmp = gen_reg_rtx (V2SFmode);
1042   emit_insn (gen_fpack (tmp, operands[1], CONST0_RTX (SFmode)));
1043
1044   switch (INTVAL (operands[2]))
1045     {
1046     case 0:
1047       emit_insn (gen_fmix_lr (operands[0], tmp, operands[0]));
1048       break;
1049     case 1:
1050       emit_insn (gen_fmix_r (operands[0], operands[0], tmp));
1051       break;
1052     default:
1053       gcc_unreachable ();
1054     }
1055   DONE;
1056 })
1057
1058 (define_insn_and_split "*vec_extractv2sf_0_le"
1059   [(set (match_operand:SF 0 "nonimmediate_operand" "=r,f,m")
1060         (unspec:SF [(match_operand:V2SF 1 "nonimmediate_operand" "rfm,rm,r")
1061                     (const_int 0)]
1062                    UNSPEC_VECT_EXTR))]
1063   "!TARGET_BIG_ENDIAN"
1064   "#"
1065   "reload_completed"
1066   [(set (match_dup 0) (match_dup 1))]
1067 {
1068   if (REG_P (operands[1]) && FR_REGNO_P (REGNO (operands[1])))
1069     operands[0] = gen_rtx_REG (V2SFmode, REGNO (operands[0]));
1070   else if (MEM_P (operands[1]))
1071     operands[1] = adjust_address (operands[1], SFmode, 0);
1072   else
1073     operands[1] = gen_rtx_REG (SFmode, REGNO (operands[1]));
1074 })
1075
1076 (define_insn_and_split "*vec_extractv2sf_0_be"
1077   [(set (match_operand:SF 0 "register_operand" "=r,f")
1078         (unspec:SF [(match_operand:V2SF 1 "register_operand" "rf,r")
1079                     (const_int 0)]
1080                    UNSPEC_VECT_EXTR))]
1081   "TARGET_BIG_ENDIAN"
1082   "#"
1083   "reload_completed"
1084   [(set (match_dup 0) (match_dup 1))]
1085 {
1086   if (REG_P (operands[1]) && FR_REGNO_P (REGNO (operands[1])))
1087     operands[0] = gen_rtx_REG (V2SFmode, REGNO (operands[0]));
1088   else
1089     operands[1] = gen_rtx_REG (SFmode, REGNO (operands[1]));
1090 })
1091
1092 (define_insn_and_split "*vec_extractv2sf_1"
1093   [(set (match_operand:SF 0 "register_operand" "=r")
1094         (unspec:SF [(match_operand:V2SF 1 "register_operand" "r")
1095                     (const_int 1)]
1096                    UNSPEC_VECT_EXTR))]
1097   ""
1098   "#"
1099   "reload_completed"
1100   [(const_int 0)]
1101 {
1102   operands[0] = gen_rtx_REG (DImode, REGNO (operands[0]));
1103   operands[1] = gen_rtx_REG (DImode, REGNO (operands[1]));
1104   emit_insn (gen_lshrdi3 (operands[0], operands[1], GEN_INT (32)));
1105   DONE;
1106 })
1107
1108 (define_expand "vec_extractv2sf"
1109   [(set (match_operand:SF 0 "register_operand" "")
1110         (unspec:SF [(match_operand:V2SF 1 "register_operand" "")
1111                     (match_operand:DI 2 "const_int_operand" "")]
1112                    UNSPEC_VECT_EXTR))]
1113   ""
1114   "")
1115
1116 ;; Missing operations
1117 ;; fprcpa
1118 ;; fpsqrta