blob: 90c121dfe3a442b56cc5abf91fb31864ee0e32b8 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===-- GenericOpcodes.td - Opcodes used with GlobalISel ---*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the generic opcodes used with GlobalISel.
11// After instruction selection, these opcodes should not appear.
12//
13//===----------------------------------------------------------------------===//
14
15//------------------------------------------------------------------------------
16// Unary ops.
17//------------------------------------------------------------------------------
18
19class GenericInstruction : StandardPseudoInstruction;
20
21// Extend the underlying scalar type of an operation, leaving the high bits
22// unspecified.
23def G_ANYEXT : GenericInstruction {
24 let OutOperandList = (outs type0:$dst);
25 let InOperandList = (ins type1:$src);
26 let hasSideEffects = 0;
27}
28
29// Sign extend the underlying scalar type of an operation, copying the sign bit
30// into the newly-created space.
31def G_SEXT : GenericInstruction {
32 let OutOperandList = (outs type0:$dst);
33 let InOperandList = (ins type1:$src);
34 let hasSideEffects = 0;
35}
36
37// Zero extend the underlying scalar type of an operation, putting zero bits
38// into the newly-created space.
39def G_ZEXT : GenericInstruction {
40 let OutOperandList = (outs type0:$dst);
41 let InOperandList = (ins type1:$src);
42 let hasSideEffects = 0;
43}
44
45
46// Truncate the underlying scalar type of an operation. This is equivalent to
47// G_EXTRACT for scalar types, but acts elementwise on vectors.
48def G_TRUNC : GenericInstruction {
49 let OutOperandList = (outs type0:$dst);
50 let InOperandList = (ins type1:$src);
51 let hasSideEffects = 0;
52}
53
54def G_IMPLICIT_DEF : GenericInstruction {
55 let OutOperandList = (outs type0:$dst);
56 let InOperandList = (ins);
57 let hasSideEffects = 0;
58}
59
60def G_PHI : GenericInstruction {
61 let OutOperandList = (outs type0:$dst);
62 let InOperandList = (ins variable_ops);
63 let hasSideEffects = 0;
64}
65
66def G_FRAME_INDEX : GenericInstruction {
67 let OutOperandList = (outs type0:$dst);
68 let InOperandList = (ins unknown:$src2);
69 let hasSideEffects = 0;
70}
71
72def G_GLOBAL_VALUE : GenericInstruction {
73 let OutOperandList = (outs type0:$dst);
74 let InOperandList = (ins unknown:$src);
75 let hasSideEffects = 0;
76}
77
78def G_INTTOPTR : GenericInstruction {
79 let OutOperandList = (outs type0:$dst);
80 let InOperandList = (ins type1:$src);
81 let hasSideEffects = 0;
82}
83
84def G_PTRTOINT : GenericInstruction {
85 let OutOperandList = (outs type0:$dst);
86 let InOperandList = (ins type1:$src);
87 let hasSideEffects = 0;
88}
89
90def G_BITCAST : GenericInstruction {
91 let OutOperandList = (outs type0:$dst);
92 let InOperandList = (ins type1:$src);
93 let hasSideEffects = 0;
94}
95
96def G_CONSTANT : GenericInstruction {
97 let OutOperandList = (outs type0:$dst);
98 let InOperandList = (ins unknown:$imm);
99 let hasSideEffects = 0;
100}
101
102def G_FCONSTANT : GenericInstruction {
103 let OutOperandList = (outs type0:$dst);
104 let InOperandList = (ins unknown:$imm);
105 let hasSideEffects = 0;
106}
107
108def G_VASTART : GenericInstruction {
109 let OutOperandList = (outs);
110 let InOperandList = (ins type0:$list);
111 let hasSideEffects = 0;
112 let mayStore = 1;
113}
114
115def G_VAARG : GenericInstruction {
116 let OutOperandList = (outs type0:$val);
117 let InOperandList = (ins type1:$list, unknown:$align);
118 let hasSideEffects = 0;
119 let mayLoad = 1;
120 let mayStore = 1;
121}
122
Andrew Scullcdfcccc2018-10-05 20:58:37 +0100123def G_CTLZ : GenericInstruction {
124 let OutOperandList = (outs type0:$dst);
125 let InOperandList = (ins type0:$src);
126 let hasSideEffects = 0;
127}
128
129def G_CTLZ_ZERO_UNDEF : GenericInstruction {
130 let OutOperandList = (outs type0:$dst);
131 let InOperandList = (ins type0:$src);
132 let hasSideEffects = 0;
133}
134
135def G_CTTZ : GenericInstruction {
136 let OutOperandList = (outs type0:$dst);
137 let InOperandList = (ins type0:$src);
138 let hasSideEffects = 0;
139}
140
141def G_CTTZ_ZERO_UNDEF : GenericInstruction {
142 let OutOperandList = (outs type0:$dst);
143 let InOperandList = (ins type0:$src);
144 let hasSideEffects = 0;
145}
146
147def G_CTPOP : GenericInstruction {
148 let OutOperandList = (outs type0:$dst);
149 let InOperandList = (ins type0:$src);
150 let hasSideEffects = 0;
151}
152
Andrew Scull5e1ddfa2018-08-14 10:06:54 +0100153def G_BSWAP : GenericInstruction {
154 let OutOperandList = (outs type0:$dst);
155 let InOperandList = (ins type0:$src);
156 let hasSideEffects = 0;
157}
158
Andrew Scullcdfcccc2018-10-05 20:58:37 +0100159def G_ADDRSPACE_CAST : GenericInstruction {
160 let OutOperandList = (outs type0:$dst);
161 let InOperandList = (ins type1:$src);
162 let hasSideEffects = 0;
163}
164
165def G_BLOCK_ADDR : GenericInstruction {
166 let OutOperandList = (outs type0:$dst);
167 let InOperandList = (ins unknown:$ba);
168 let hasSideEffects = 0;
169}
170
Andrew Scull5e1ddfa2018-08-14 10:06:54 +0100171//------------------------------------------------------------------------------
172// Binary ops.
173//------------------------------------------------------------------------------
174
175// Generic addition.
176def G_ADD : GenericInstruction {
177 let OutOperandList = (outs type0:$dst);
178 let InOperandList = (ins type0:$src1, type0:$src2);
179 let hasSideEffects = 0;
180 let isCommutable = 1;
181}
182
183// Generic subtraction.
184def G_SUB : GenericInstruction {
185 let OutOperandList = (outs type0:$dst);
186 let InOperandList = (ins type0:$src1, type0:$src2);
187 let hasSideEffects = 0;
188 let isCommutable = 0;
189}
190
191// Generic multiplication.
192def G_MUL : GenericInstruction {
193 let OutOperandList = (outs type0:$dst);
194 let InOperandList = (ins type0:$src1, type0:$src2);
195 let hasSideEffects = 0;
196 let isCommutable = 1;
197}
198
199// Generic signed division.
200def G_SDIV : GenericInstruction {
201 let OutOperandList = (outs type0:$dst);
202 let InOperandList = (ins type0:$src1, type0:$src2);
203 let hasSideEffects = 0;
204 let isCommutable = 0;
205}
206
207// Generic unsigned division.
208def G_UDIV : GenericInstruction {
209 let OutOperandList = (outs type0:$dst);
210 let InOperandList = (ins type0:$src1, type0:$src2);
211 let hasSideEffects = 0;
212 let isCommutable = 0;
213}
214
215// Generic signed remainder.
216def G_SREM : GenericInstruction {
217 let OutOperandList = (outs type0:$dst);
218 let InOperandList = (ins type0:$src1, type0:$src2);
219 let hasSideEffects = 0;
220 let isCommutable = 0;
221}
222
223// Generic unsigned remainder.
224def G_UREM : GenericInstruction {
225 let OutOperandList = (outs type0:$dst);
226 let InOperandList = (ins type0:$src1, type0:$src2);
227 let hasSideEffects = 0;
228 let isCommutable = 0;
229}
230
231// Generic bitwise and.
232def G_AND : GenericInstruction {
233 let OutOperandList = (outs type0:$dst);
234 let InOperandList = (ins type0:$src1, type0:$src2);
235 let hasSideEffects = 0;
236 let isCommutable = 1;
237}
238
239// Generic bitwise or.
240def G_OR : GenericInstruction {
241 let OutOperandList = (outs type0:$dst);
242 let InOperandList = (ins type0:$src1, type0:$src2);
243 let hasSideEffects = 0;
244 let isCommutable = 1;
245}
246
247// Generic bitwise xor.
248def G_XOR : GenericInstruction {
249 let OutOperandList = (outs type0:$dst);
250 let InOperandList = (ins type0:$src1, type0:$src2);
251 let hasSideEffects = 0;
252 let isCommutable = 1;
253}
254
255// Generic left-shift.
256def G_SHL : GenericInstruction {
257 let OutOperandList = (outs type0:$dst);
258 let InOperandList = (ins type0:$src1, type0:$src2);
259 let hasSideEffects = 0;
260}
261
262// Generic logical right-shift.
263def G_LSHR : GenericInstruction {
264 let OutOperandList = (outs type0:$dst);
265 let InOperandList = (ins type0:$src1, type0:$src2);
266 let hasSideEffects = 0;
267}
268
269// Generic arithmetic right-shift.
270def G_ASHR : GenericInstruction {
271 let OutOperandList = (outs type0:$dst);
272 let InOperandList = (ins type0:$src1, type0:$src2);
273 let hasSideEffects = 0;
274}
275
276// Generic integer comparison.
277def G_ICMP : GenericInstruction {
278 let OutOperandList = (outs type0:$dst);
279 let InOperandList = (ins unknown:$tst, type1:$src1, type1:$src2);
280 let hasSideEffects = 0;
281}
282
283// Generic floating-point comparison.
284def G_FCMP : GenericInstruction {
285 let OutOperandList = (outs type0:$dst);
286 let InOperandList = (ins unknown:$tst, type1:$src1, type1:$src2);
287 let hasSideEffects = 0;
288}
289
290// Generic select
291def G_SELECT : GenericInstruction {
292 let OutOperandList = (outs type0:$dst);
293 let InOperandList = (ins type1:$tst, type0:$src1, type0:$src2);
294 let hasSideEffects = 0;
295}
296
297// Generic pointer offset.
298def G_GEP : GenericInstruction {
299 let OutOperandList = (outs type0:$dst);
300 let InOperandList = (ins type0:$src1, type1:$src2);
301 let hasSideEffects = 0;
302}
303
304def G_PTR_MASK : GenericInstruction {
305 let OutOperandList = (outs type0:$dst);
306 let InOperandList = (ins type0:$src, unknown:$bits);
307 let hasSideEffects = 0;
308}
309
310//------------------------------------------------------------------------------
311// Overflow ops
312//------------------------------------------------------------------------------
313
314// Generic unsigned addition consuming and producing a carry flag.
315def G_UADDE : GenericInstruction {
316 let OutOperandList = (outs type0:$dst, type1:$carry_out);
317 let InOperandList = (ins type0:$src1, type0:$src2, type1:$carry_in);
318 let hasSideEffects = 0;
319}
320
321// Generic signed addition producing a carry flag.
322def G_SADDO : GenericInstruction {
323 let OutOperandList = (outs type0:$dst, type1:$carry_out);
324 let InOperandList = (ins type0:$src1, type0:$src2);
325 let hasSideEffects = 0;
326 let isCommutable = 1;
327}
328
329// Generic unsigned subtraction consuming and producing a carry flag.
330def G_USUBE : GenericInstruction {
331 let OutOperandList = (outs type0:$dst, type1:$carry_out);
332 let InOperandList = (ins type0:$src1, type0:$src2, type1:$carry_in);
333 let hasSideEffects = 0;
334}
335
336// Generic unsigned subtraction producing a carry flag.
337def G_SSUBO : GenericInstruction {
338 let OutOperandList = (outs type0:$dst, type1:$carry_out);
339 let InOperandList = (ins type0:$src1, type0:$src2);
340 let hasSideEffects = 0;
341}
342
343// Generic unsigned multiplication producing a carry flag.
344def G_UMULO : GenericInstruction {
345 let OutOperandList = (outs type0:$dst, type1:$carry_out);
346 let InOperandList = (ins type0:$src1, type0:$src2);
347 let hasSideEffects = 0;
348 let isCommutable = 1;
349}
350
351// Generic signed multiplication producing a carry flag.
352def G_SMULO : GenericInstruction {
353 let OutOperandList = (outs type0:$dst, type1:$carry_out);
354 let InOperandList = (ins type0:$src1, type0:$src2);
355 let hasSideEffects = 0;
356 let isCommutable = 1;
357}
358
359// Multiply two numbers at twice the incoming bit width (unsigned) and return
360// the high half of the result.
361def G_UMULH : GenericInstruction {
362 let OutOperandList = (outs type0:$dst);
363 let InOperandList = (ins type0:$src1, type0:$src2);
364 let hasSideEffects = 0;
365 let isCommutable = 1;
366}
367
368// Multiply two numbers at twice the incoming bit width (signed) and return
369// the high half of the result.
370def G_SMULH : GenericInstruction {
371 let OutOperandList = (outs type0:$dst);
372 let InOperandList = (ins type0:$src1, type0:$src2);
373 let hasSideEffects = 0;
374 let isCommutable = 1;
375}
376
377//------------------------------------------------------------------------------
378// Floating Point Unary Ops.
379//------------------------------------------------------------------------------
380
381def G_FNEG : GenericInstruction {
382 let OutOperandList = (outs type0:$dst);
383 let InOperandList = (ins type0:$src);
384 let hasSideEffects = 0;
385}
386
387def G_FPEXT : GenericInstruction {
388 let OutOperandList = (outs type0:$dst);
389 let InOperandList = (ins type1:$src);
390 let hasSideEffects = 0;
391}
392
393def G_FPTRUNC : GenericInstruction {
394 let OutOperandList = (outs type0:$dst);
395 let InOperandList = (ins type1:$src);
396 let hasSideEffects = 0;
397}
398
399def G_FPTOSI : GenericInstruction {
400 let OutOperandList = (outs type0:$dst);
401 let InOperandList = (ins type1:$src);
402 let hasSideEffects = 0;
403}
404
405def G_FPTOUI : GenericInstruction {
406 let OutOperandList = (outs type0:$dst);
407 let InOperandList = (ins type1:$src);
408 let hasSideEffects = 0;
409}
410
411def G_SITOFP : GenericInstruction {
412 let OutOperandList = (outs type0:$dst);
413 let InOperandList = (ins type1:$src);
414 let hasSideEffects = 0;
415}
416
417def G_UITOFP : GenericInstruction {
418 let OutOperandList = (outs type0:$dst);
419 let InOperandList = (ins type1:$src);
420 let hasSideEffects = 0;
421}
422
423def G_FABS : GenericInstruction {
424 let OutOperandList = (outs type0:$dst);
425 let InOperandList = (ins type0:$src);
426 let hasSideEffects = 0;
427}
428
429//------------------------------------------------------------------------------
430// Floating Point Binary ops.
431//------------------------------------------------------------------------------
432
433// Generic FP addition.
434def G_FADD : GenericInstruction {
435 let OutOperandList = (outs type0:$dst);
436 let InOperandList = (ins type0:$src1, type0:$src2);
437 let hasSideEffects = 0;
438 let isCommutable = 1;
439}
440
441// Generic FP subtraction.
442def G_FSUB : GenericInstruction {
443 let OutOperandList = (outs type0:$dst);
444 let InOperandList = (ins type0:$src1, type0:$src2);
445 let hasSideEffects = 0;
446 let isCommutable = 0;
447}
448
449// Generic FP multiplication.
450def G_FMUL : GenericInstruction {
451 let OutOperandList = (outs type0:$dst);
452 let InOperandList = (ins type0:$src1, type0:$src2);
453 let hasSideEffects = 0;
454 let isCommutable = 1;
455}
456
457// Generic fused multiply-add instruction.
458// Behaves like llvm fma intrinsic ie src1 * src2 + src3
459def G_FMA : GenericInstruction {
460 let OutOperandList = (outs type0:$dst);
461 let InOperandList = (ins type0:$src1, type0:$src2, type0:$src3);
462 let hasSideEffects = 0;
463 let isCommutable = 0;
464}
465
466// Generic FP division.
467def G_FDIV : GenericInstruction {
468 let OutOperandList = (outs type0:$dst);
469 let InOperandList = (ins type0:$src1, type0:$src2);
470 let hasSideEffects = 0;
471}
472
473// Generic FP remainder.
474def G_FREM : GenericInstruction {
475 let OutOperandList = (outs type0:$dst);
476 let InOperandList = (ins type0:$src1, type0:$src2);
477 let hasSideEffects = 0;
478}
479
480// Floating point exponentiation.
481def G_FPOW : GenericInstruction {
482 let OutOperandList = (outs type0:$dst);
483 let InOperandList = (ins type0:$src1, type0:$src2);
484 let hasSideEffects = 0;
485}
486
487// Floating point base-e exponential of a value.
488def G_FEXP : GenericInstruction {
489 let OutOperandList = (outs type0:$dst);
490 let InOperandList = (ins type0:$src1);
491 let hasSideEffects = 0;
492}
493
494// Floating point base-2 exponential of a value.
495def G_FEXP2 : GenericInstruction {
496 let OutOperandList = (outs type0:$dst);
497 let InOperandList = (ins type0:$src1);
498 let hasSideEffects = 0;
499}
500
501// Floating point base-2 logarithm of a value.
502def G_FLOG : GenericInstruction {
503 let OutOperandList = (outs type0:$dst);
504 let InOperandList = (ins type0:$src1);
505 let hasSideEffects = 0;
506}
507
508// Floating point base-2 logarithm of a value.
509def G_FLOG2 : GenericInstruction {
510 let OutOperandList = (outs type0:$dst);
511 let InOperandList = (ins type0:$src1);
512 let hasSideEffects = 0;
513}
514
515//------------------------------------------------------------------------------
516// Memory ops
517//------------------------------------------------------------------------------
518
519// Generic load. Expects a MachineMemOperand in addition to explicit operands.
520def G_LOAD : GenericInstruction {
521 let OutOperandList = (outs type0:$dst);
522 let InOperandList = (ins ptype1:$addr);
523 let hasSideEffects = 0;
524 let mayLoad = 1;
525}
526
Andrew Scullcdfcccc2018-10-05 20:58:37 +0100527// Generic sign-extended load. Expects a MachineMemOperand in addition to explicit operands.
528def G_SEXTLOAD : GenericInstruction {
529 let OutOperandList = (outs type0:$dst);
530 let InOperandList = (ins ptype1:$addr);
531 let hasSideEffects = 0;
532 let mayLoad = 1;
533}
534
535// Generic zero-extended load. Expects a MachineMemOperand in addition to explicit operands.
536def G_ZEXTLOAD : GenericInstruction {
537 let OutOperandList = (outs type0:$dst);
538 let InOperandList = (ins ptype1:$addr);
539 let hasSideEffects = 0;
540 let mayLoad = 1;
541}
542
Andrew Scull5e1ddfa2018-08-14 10:06:54 +0100543// Generic store. Expects a MachineMemOperand in addition to explicit operands.
544def G_STORE : GenericInstruction {
545 let OutOperandList = (outs);
546 let InOperandList = (ins type0:$src, ptype1:$addr);
547 let hasSideEffects = 0;
548 let mayStore = 1;
549}
550
551// Generic atomic cmpxchg with internal success check. Expects a
552// MachineMemOperand in addition to explicit operands.
553def G_ATOMIC_CMPXCHG_WITH_SUCCESS : GenericInstruction {
554 let OutOperandList = (outs type0:$oldval, type1:$success);
555 let InOperandList = (ins type2:$addr, type0:$cmpval, type0:$newval);
556 let hasSideEffects = 0;
557 let mayLoad = 1;
558 let mayStore = 1;
559}
560
561// Generic atomic cmpxchg. Expects a MachineMemOperand in addition to explicit
562// operands.
563def G_ATOMIC_CMPXCHG : GenericInstruction {
564 let OutOperandList = (outs type0:$oldval);
565 let InOperandList = (ins ptype1:$addr, type0:$cmpval, type0:$newval);
566 let hasSideEffects = 0;
567 let mayLoad = 1;
568 let mayStore = 1;
569}
570
571// Generic atomicrmw. Expects a MachineMemOperand in addition to explicit
572// operands.
573class G_ATOMICRMW_OP : GenericInstruction {
574 let OutOperandList = (outs type0:$oldval);
575 let InOperandList = (ins ptype1:$addr, type0:$val);
576 let hasSideEffects = 0;
577 let mayLoad = 1;
578 let mayStore = 1;
579}
580
581def G_ATOMICRMW_XCHG : G_ATOMICRMW_OP;
582def G_ATOMICRMW_ADD : G_ATOMICRMW_OP;
583def G_ATOMICRMW_SUB : G_ATOMICRMW_OP;
584def G_ATOMICRMW_AND : G_ATOMICRMW_OP;
585def G_ATOMICRMW_NAND : G_ATOMICRMW_OP;
586def G_ATOMICRMW_OR : G_ATOMICRMW_OP;
587def G_ATOMICRMW_XOR : G_ATOMICRMW_OP;
588def G_ATOMICRMW_MAX : G_ATOMICRMW_OP;
589def G_ATOMICRMW_MIN : G_ATOMICRMW_OP;
590def G_ATOMICRMW_UMAX : G_ATOMICRMW_OP;
591def G_ATOMICRMW_UMIN : G_ATOMICRMW_OP;
592
593//------------------------------------------------------------------------------
594// Variadic ops
595//------------------------------------------------------------------------------
596
597// Extract a register of the specified size, starting from the block given by
598// index. This will almost certainly be mapped to sub-register COPYs after
599// register banks have been selected.
600def G_EXTRACT : GenericInstruction {
601 let OutOperandList = (outs type0:$res);
602 let InOperandList = (ins type1:$src, unknown:$offset);
603 let hasSideEffects = 0;
604}
605
606// Extract multiple registers specified size, starting from blocks given by
607// indexes. This will almost certainly be mapped to sub-register COPYs after
608// register banks have been selected.
609def G_UNMERGE_VALUES : GenericInstruction {
610 let OutOperandList = (outs type0:$dst0, variable_ops);
611 let InOperandList = (ins type1:$src);
612 let hasSideEffects = 0;
613}
614
615// Insert a smaller register into a larger one at the specified bit-index.
616def G_INSERT : GenericInstruction {
617 let OutOperandList = (outs type0:$dst);
618 let InOperandList = (ins type0:$src, type1:$op, unknown:$offset);
619 let hasSideEffects = 0;
620}
621
622/// Concatenate multiple registers of the same size into a wider register.
623def G_MERGE_VALUES : GenericInstruction {
624 let OutOperandList = (outs type0:$dst);
625 let InOperandList = (ins type1:$src0, variable_ops);
626 let hasSideEffects = 0;
627}
628
629// Intrinsic without side effects.
630def G_INTRINSIC : GenericInstruction {
631 let OutOperandList = (outs);
632 let InOperandList = (ins unknown:$intrin, variable_ops);
633 let hasSideEffects = 0;
634}
635
636// Intrinsic with side effects.
637def G_INTRINSIC_W_SIDE_EFFECTS : GenericInstruction {
638 let OutOperandList = (outs);
639 let InOperandList = (ins unknown:$intrin, variable_ops);
640 let hasSideEffects = 1;
641 let mayLoad = 1;
642 let mayStore = 1;
643}
644
645//------------------------------------------------------------------------------
646// Branches.
647//------------------------------------------------------------------------------
648
649// Generic unconditional branch.
650def G_BR : GenericInstruction {
651 let OutOperandList = (outs);
652 let InOperandList = (ins unknown:$src1);
653 let hasSideEffects = 0;
654 let isBranch = 1;
655 let isTerminator = 1;
656 let isBarrier = 1;
657}
658
659// Generic conditional branch.
660def G_BRCOND : GenericInstruction {
661 let OutOperandList = (outs);
662 let InOperandList = (ins type0:$tst, unknown:$truebb);
663 let hasSideEffects = 0;
664 let isBranch = 1;
665 let isTerminator = 1;
666}
667
668// Generic indirect branch.
669def G_BRINDIRECT : GenericInstruction {
670 let OutOperandList = (outs);
671 let InOperandList = (ins type0:$src1);
672 let hasSideEffects = 0;
673 let isBranch = 1;
674 let isTerminator = 1;
675}
676
677//------------------------------------------------------------------------------
678// Vector ops
679//------------------------------------------------------------------------------
680
681// Generic insertelement.
682def G_INSERT_VECTOR_ELT : GenericInstruction {
683 let OutOperandList = (outs type0:$dst);
684 let InOperandList = (ins type0:$src, type1:$elt, type2:$idx);
685 let hasSideEffects = 0;
686}
687
688// Generic extractelement.
689def G_EXTRACT_VECTOR_ELT : GenericInstruction {
690 let OutOperandList = (outs type0:$dst);
691 let InOperandList = (ins type1:$src, type2:$idx);
692 let hasSideEffects = 0;
693}
694
695// Generic shufflevector.
696def G_SHUFFLE_VECTOR: GenericInstruction {
697 let OutOperandList = (outs type0:$dst);
698 let InOperandList = (ins type1:$v1, type1:$v2, type2:$mask);
699 let hasSideEffects = 0;
700}
701
702// TODO: Add the other generic opcodes.