Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
//===- IntrinsicsMips.td - Defines Mips intrinsics ---------*- tablegen -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines all of the MIPS-specific intrinsics.
10
//
11
//===----------------------------------------------------------------------===//
12
 
13
//===----------------------------------------------------------------------===//
14
// MIPS DSP data types
15
def mips_v2q15_ty: LLVMType<v2i16>;
16
def mips_v4q7_ty: LLVMType<v4i8>;
17
def mips_q31_ty: LLVMType<i32>;
18
 
19
let TargetPrefix = "mips" in {  // All intrinsics start with "llvm.mips.".
20
 
21
//===----------------------------------------------------------------------===//
22
// MIPS DSP Rev 1
23
 
24
//===----------------------------------------------------------------------===//
25
// Addition/subtraction
26
 
27
def int_mips_addu_qb : ClangBuiltin<"__builtin_mips_addu_qb">,
28
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty],
29
            [Commutative, IntrNoMem]>;
30
def int_mips_addu_s_qb : ClangBuiltin<"__builtin_mips_addu_s_qb">,
31
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty],
32
            [Commutative, IntrNoMem]>;
33
def int_mips_subu_qb : ClangBuiltin<"__builtin_mips_subu_qb">,
34
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>;
35
def int_mips_subu_s_qb : ClangBuiltin<"__builtin_mips_subu_s_qb">,
36
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>;
37
 
38
def int_mips_addq_ph : ClangBuiltin<"__builtin_mips_addq_ph">,
39
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty],
40
            [Commutative, IntrNoMem]>;
41
def int_mips_addq_s_ph : ClangBuiltin<"__builtin_mips_addq_s_ph">,
42
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty],
43
            [Commutative, IntrNoMem]>;
44
def int_mips_subq_ph : ClangBuiltin<"__builtin_mips_subq_ph">,
45
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
46
def int_mips_subq_s_ph : ClangBuiltin<"__builtin_mips_subq_s_ph">,
47
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
48
 
49
def int_mips_madd: ClangBuiltin<"__builtin_mips_madd">,
50
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
51
            [IntrNoMem, Commutative]>;
52
def int_mips_maddu: ClangBuiltin<"__builtin_mips_maddu">,
53
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
54
            [IntrNoMem, Commutative]>;
55
 
56
def int_mips_msub: ClangBuiltin<"__builtin_mips_msub">,
57
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
58
            [IntrNoMem]>;
59
def int_mips_msubu: ClangBuiltin<"__builtin_mips_msubu">,
60
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
61
            [IntrNoMem]>;
62
 
63
def int_mips_addq_s_w: ClangBuiltin<"__builtin_mips_addq_s_w">,
64
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>;
65
def int_mips_subq_s_w: ClangBuiltin<"__builtin_mips_subq_s_w">,
66
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], []>;
67
 
68
def int_mips_addsc: ClangBuiltin<"__builtin_mips_addsc">,
69
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>;
70
def int_mips_addwc: ClangBuiltin<"__builtin_mips_addwc">,
71
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>;
72
 
73
def int_mips_modsub: ClangBuiltin<"__builtin_mips_modsub">,
74
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
75
 
76
def int_mips_raddu_w_qb: ClangBuiltin<"__builtin_mips_raddu_w_qb">,
77
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty], [IntrNoMem]>;
78
 
79
//===----------------------------------------------------------------------===//
80
// Absolute value
81
 
82
def int_mips_absq_s_ph: ClangBuiltin<"__builtin_mips_absq_s_ph">,
83
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty], []>;
84
def int_mips_absq_s_w: ClangBuiltin<"__builtin_mips_absq_s_w">,
85
  Intrinsic<[mips_q31_ty], [mips_q31_ty], []>;
86
 
87
//===----------------------------------------------------------------------===//
88
// Precision reduce/expand
89
 
90
def int_mips_precrq_qb_ph: ClangBuiltin<"__builtin_mips_precrq_qb_ph">,
91
  Intrinsic<[llvm_v4i8_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
92
def int_mips_precrqu_s_qb_ph: ClangBuiltin<"__builtin_mips_precrqu_s_qb_ph">,
93
  Intrinsic<[llvm_v4i8_ty], [mips_v2q15_ty, mips_v2q15_ty], []>;
94
def int_mips_precrq_ph_w: ClangBuiltin<"__builtin_mips_precrq_ph_w">,
95
  Intrinsic<[mips_v2q15_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>;
96
def int_mips_precrq_rs_ph_w: ClangBuiltin<"__builtin_mips_precrq_rs_ph_w">,
97
  Intrinsic<[mips_v2q15_ty], [mips_q31_ty, mips_q31_ty], []>;
98
def int_mips_preceq_w_phl: ClangBuiltin<"__builtin_mips_preceq_w_phl">,
99
  Intrinsic<[mips_q31_ty], [mips_v2q15_ty], [IntrNoMem]>;
100
def int_mips_preceq_w_phr: ClangBuiltin<"__builtin_mips_preceq_w_phr">,
101
  Intrinsic<[mips_q31_ty], [mips_v2q15_ty], [IntrNoMem]>;
102
def int_mips_precequ_ph_qbl: ClangBuiltin<"__builtin_mips_precequ_ph_qbl">,
103
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
104
def int_mips_precequ_ph_qbr: ClangBuiltin<"__builtin_mips_precequ_ph_qbr">,
105
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
106
def int_mips_precequ_ph_qbla: ClangBuiltin<"__builtin_mips_precequ_ph_qbla">,
107
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
108
def int_mips_precequ_ph_qbra: ClangBuiltin<"__builtin_mips_precequ_ph_qbra">,
109
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
110
def int_mips_preceu_ph_qbl: ClangBuiltin<"__builtin_mips_preceu_ph_qbl">,
111
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
112
def int_mips_preceu_ph_qbr: ClangBuiltin<"__builtin_mips_preceu_ph_qbr">,
113
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
114
def int_mips_preceu_ph_qbla: ClangBuiltin<"__builtin_mips_preceu_ph_qbla">,
115
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
116
def int_mips_preceu_ph_qbra: ClangBuiltin<"__builtin_mips_preceu_ph_qbra">,
117
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>;
118
 
119
//===----------------------------------------------------------------------===//
120
// Shift
121
 
122
def int_mips_shll_qb: ClangBuiltin<"__builtin_mips_shll_qb">,
123
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], []>;
124
def int_mips_shrl_qb: ClangBuiltin<"__builtin_mips_shrl_qb">,
125
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>;
126
def int_mips_shll_ph: ClangBuiltin<"__builtin_mips_shll_ph">,
127
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], []>;
128
def int_mips_shll_s_ph: ClangBuiltin<"__builtin_mips_shll_s_ph">,
129
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], []>;
130
def int_mips_shra_ph: ClangBuiltin<"__builtin_mips_shra_ph">,
131
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], [IntrNoMem]>;
132
def int_mips_shra_r_ph: ClangBuiltin<"__builtin_mips_shra_r_ph">,
133
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], [IntrNoMem]>;
134
def int_mips_shll_s_w: ClangBuiltin<"__builtin_mips_shll_s_w">,
135
  Intrinsic<[mips_q31_ty], [mips_q31_ty, llvm_i32_ty], []>;
136
def int_mips_shra_r_w: ClangBuiltin<"__builtin_mips_shra_r_w">,
137
  Intrinsic<[mips_q31_ty], [mips_q31_ty, llvm_i32_ty], [IntrNoMem]>;
138
def int_mips_shilo: ClangBuiltin<"__builtin_mips_shilo">,
139
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>;
140
 
141
//===----------------------------------------------------------------------===//
142
// Multiplication
143
 
144
def int_mips_muleu_s_ph_qbl: ClangBuiltin<"__builtin_mips_muleu_s_ph_qbl">,
145
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty, mips_v2q15_ty], []>;
146
def int_mips_muleu_s_ph_qbr: ClangBuiltin<"__builtin_mips_muleu_s_ph_qbr">,
147
  Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty, mips_v2q15_ty], []>;
148
def int_mips_mulq_rs_ph: ClangBuiltin<"__builtin_mips_mulq_rs_ph">,
149
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>;
150
def int_mips_muleq_s_w_phl: ClangBuiltin<"__builtin_mips_muleq_s_w_phl">,
151
  Intrinsic<[mips_q31_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>;
152
def int_mips_muleq_s_w_phr: ClangBuiltin<"__builtin_mips_muleq_s_w_phr">,
153
  Intrinsic<[mips_q31_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>;
154
def int_mips_mulsaq_s_w_ph: ClangBuiltin<"__builtin_mips_mulsaq_s_w_ph">,
155
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
156
def int_mips_maq_s_w_phl: ClangBuiltin<"__builtin_mips_maq_s_w_phl">,
157
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
158
def int_mips_maq_s_w_phr: ClangBuiltin<"__builtin_mips_maq_s_w_phr">,
159
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
160
def int_mips_maq_sa_w_phl: ClangBuiltin<"__builtin_mips_maq_sa_w_phl">,
161
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
162
def int_mips_maq_sa_w_phr: ClangBuiltin<"__builtin_mips_maq_sa_w_phr">,
163
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
164
def int_mips_mult: ClangBuiltin<"__builtin_mips_mult">,
165
  Intrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty],
166
            [IntrNoMem, Commutative]>;
167
def int_mips_multu: ClangBuiltin<"__builtin_mips_multu">,
168
  Intrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty],
169
            [IntrNoMem, Commutative]>;
170
 
171
//===----------------------------------------------------------------------===//
172
// Dot product with accumulate/subtract
173
 
174
def int_mips_dpau_h_qbl: ClangBuiltin<"__builtin_mips_dpau_h_qbl">,
175
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty],
176
            [IntrNoMem]>;
177
def int_mips_dpau_h_qbr: ClangBuiltin<"__builtin_mips_dpau_h_qbr">,
178
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty],
179
            [IntrNoMem]>;
180
def int_mips_dpsu_h_qbl: ClangBuiltin<"__builtin_mips_dpsu_h_qbl">,
181
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty],
182
            [IntrNoMem]>;
183
def int_mips_dpsu_h_qbr: ClangBuiltin<"__builtin_mips_dpsu_h_qbr">,
184
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty],
185
            [IntrNoMem]>;
186
def int_mips_dpaq_s_w_ph: ClangBuiltin<"__builtin_mips_dpaq_s_w_ph">,
187
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
188
def int_mips_dpsq_s_w_ph: ClangBuiltin<"__builtin_mips_dpsq_s_w_ph">,
189
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
190
def int_mips_dpaq_sa_l_w: ClangBuiltin<"__builtin_mips_dpaq_sa_l_w">,
191
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_q31_ty, mips_q31_ty], []>;
192
def int_mips_dpsq_sa_l_w: ClangBuiltin<"__builtin_mips_dpsq_sa_l_w">,
193
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_q31_ty, mips_q31_ty], []>;
194
 
195
//===----------------------------------------------------------------------===//
196
// Comparison
197
 
198
def int_mips_cmpu_eq_qb: ClangBuiltin<"__builtin_mips_cmpu_eq_qb">,
199
  Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>;
200
def int_mips_cmpu_lt_qb: ClangBuiltin<"__builtin_mips_cmpu_lt_qb">,
201
  Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
202
def int_mips_cmpu_le_qb: ClangBuiltin<"__builtin_mips_cmpu_le_qb">,
203
  Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
204
def int_mips_cmpgu_eq_qb: ClangBuiltin<"__builtin_mips_cmpgu_eq_qb">,
205
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>;
206
def int_mips_cmpgu_lt_qb: ClangBuiltin<"__builtin_mips_cmpgu_lt_qb">,
207
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
208
def int_mips_cmpgu_le_qb: ClangBuiltin<"__builtin_mips_cmpgu_le_qb">,
209
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
210
def int_mips_cmp_eq_ph: ClangBuiltin<"__builtin_mips_cmp_eq_ph">,
211
  Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>;
212
def int_mips_cmp_lt_ph: ClangBuiltin<"__builtin_mips_cmp_lt_ph">,
213
  Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], []>;
214
def int_mips_cmp_le_ph: ClangBuiltin<"__builtin_mips_cmp_le_ph">,
215
  Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], []>;
216
 
217
//===----------------------------------------------------------------------===//
218
// Extracting
219
 
220
def int_mips_extr_s_h: ClangBuiltin<"__builtin_mips_extr_s_h">,
221
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
222
def int_mips_extr_w: ClangBuiltin<"__builtin_mips_extr_w">,
223
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
224
def int_mips_extr_rs_w: ClangBuiltin<"__builtin_mips_extr_rs_w">,
225
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
226
def int_mips_extr_r_w: ClangBuiltin<"__builtin_mips_extr_r_w">,
227
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
228
def int_mips_extp: ClangBuiltin<"__builtin_mips_extp">,
229
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
230
def int_mips_extpdp: ClangBuiltin<"__builtin_mips_extpdp">,
231
  Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>;
232
 
233
//===----------------------------------------------------------------------===//
234
// Misc
235
 
236
def int_mips_wrdsp: ClangBuiltin<"__builtin_mips_wrdsp">,
237
  Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<ArgIndex<1>>]>;
238
def int_mips_rddsp: ClangBuiltin<"__builtin_mips_rddsp">,
239
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrReadMem, ImmArg<ArgIndex<0>>]>;
240
 
241
def int_mips_insv: ClangBuiltin<"__builtin_mips_insv">,
242
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadMem]>;
243
def int_mips_bitrev: ClangBuiltin<"__builtin_mips_bitrev">,
244
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
245
 
246
def int_mips_packrl_ph: ClangBuiltin<"__builtin_mips_packrl_ph">,
247
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
248
 
249
def int_mips_repl_qb: ClangBuiltin<"__builtin_mips_repl_qb">,
250
  Intrinsic<[llvm_v4i8_ty], [llvm_i32_ty], [IntrNoMem]>;
251
def int_mips_repl_ph: ClangBuiltin<"__builtin_mips_repl_ph">,
252
  Intrinsic<[mips_v2q15_ty], [llvm_i32_ty], [IntrNoMem]>;
253
 
254
def int_mips_pick_qb: ClangBuiltin<"__builtin_mips_pick_qb">,
255
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrReadMem]>;
256
def int_mips_pick_ph: ClangBuiltin<"__builtin_mips_pick_ph">,
257
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrReadMem]>;
258
 
259
def int_mips_mthlip: ClangBuiltin<"__builtin_mips_mthlip">,
260
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], []>;
261
 
262
def int_mips_bposge32: ClangBuiltin<"__builtin_mips_bposge32">,
263
  Intrinsic<[llvm_i32_ty], [], [IntrReadMem]>;
264
 
265
def int_mips_lbux: ClangBuiltin<"__builtin_mips_lbux">,
266
  Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>;
267
def int_mips_lhx: ClangBuiltin<"__builtin_mips_lhx">,
268
  Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>;
269
def int_mips_lwx: ClangBuiltin<"__builtin_mips_lwx">,
270
  Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>;
271
 
272
//===----------------------------------------------------------------------===//
273
// MIPS DSP Rev 2
274
 
275
def int_mips_absq_s_qb: ClangBuiltin<"__builtin_mips_absq_s_qb">,
276
  Intrinsic<[mips_v4q7_ty], [mips_v4q7_ty], []>;
277
 
278
def int_mips_addqh_ph: ClangBuiltin<"__builtin_mips_addqh_ph">,
279
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty],
280
            [IntrNoMem, Commutative]>;
281
def int_mips_addqh_r_ph: ClangBuiltin<"__builtin_mips_addqh_r_ph">,
282
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty],
283
            [IntrNoMem, Commutative]>;
284
def int_mips_addqh_w: ClangBuiltin<"__builtin_mips_addqh_w">,
285
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty],
286
            [IntrNoMem, Commutative]>;
287
def int_mips_addqh_r_w: ClangBuiltin<"__builtin_mips_addqh_r_w">,
288
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty],
289
            [IntrNoMem, Commutative]>;
290
 
291
def int_mips_addu_ph: ClangBuiltin<"__builtin_mips_addu_ph">,
292
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>;
293
def int_mips_addu_s_ph: ClangBuiltin<"__builtin_mips_addu_s_ph">,
294
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>;
295
 
296
def int_mips_adduh_qb: ClangBuiltin<"__builtin_mips_adduh_qb">,
297
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty],
298
            [IntrNoMem, Commutative]>;
299
def int_mips_adduh_r_qb: ClangBuiltin<"__builtin_mips_adduh_r_qb">,
300
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty],
301
            [IntrNoMem, Commutative]>;
302
 
303
def int_mips_append: ClangBuiltin<"__builtin_mips_append">,
304
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
305
  [IntrNoMem, ImmArg<ArgIndex<2>>]>;
306
def int_mips_balign: ClangBuiltin<"__builtin_mips_balign">,
307
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
308
  [IntrNoMem, ImmArg<ArgIndex<2>>]>;
309
 
310
def int_mips_cmpgdu_eq_qb: ClangBuiltin<"__builtin_mips_cmpgdu_eq_qb">,
311
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>;
312
def int_mips_cmpgdu_lt_qb: ClangBuiltin<"__builtin_mips_cmpgdu_lt_qb">,
313
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
314
def int_mips_cmpgdu_le_qb: ClangBuiltin<"__builtin_mips_cmpgdu_le_qb">,
315
  Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>;
316
 
317
def int_mips_dpa_w_ph: ClangBuiltin<"__builtin_mips_dpa_w_ph">,
318
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty],
319
            [IntrNoMem]>;
320
def int_mips_dps_w_ph: ClangBuiltin<"__builtin_mips_dps_w_ph">,
321
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty],
322
            [IntrNoMem]>;
323
 
324
def int_mips_dpaqx_s_w_ph: ClangBuiltin<"__builtin_mips_dpaqx_s_w_ph">,
325
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
326
def int_mips_dpaqx_sa_w_ph: ClangBuiltin<"__builtin_mips_dpaqx_sa_w_ph">,
327
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
328
def int_mips_dpax_w_ph: ClangBuiltin<"__builtin_mips_dpax_w_ph">,
329
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty],
330
            [IntrNoMem]>;
331
def int_mips_dpsx_w_ph: ClangBuiltin<"__builtin_mips_dpsx_w_ph">,
332
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty],
333
            [IntrNoMem]>;
334
def int_mips_dpsqx_s_w_ph: ClangBuiltin<"__builtin_mips_dpsqx_s_w_ph">,
335
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
336
def int_mips_dpsqx_sa_w_ph: ClangBuiltin<"__builtin_mips_dpsqx_sa_w_ph">,
337
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>;
338
 
339
def int_mips_mul_ph: ClangBuiltin<"__builtin_mips_mul_ph">,
340
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>;
341
def int_mips_mul_s_ph: ClangBuiltin<"__builtin_mips_mul_s_ph">,
342
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>;
343
 
344
def int_mips_mulq_rs_w: ClangBuiltin<"__builtin_mips_mulq_rs_w">,
345
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>;
346
def int_mips_mulq_s_ph: ClangBuiltin<"__builtin_mips_mulq_s_ph">,
347
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>;
348
def int_mips_mulq_s_w: ClangBuiltin<"__builtin_mips_mulq_s_w">,
349
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>;
350
def int_mips_mulsa_w_ph: ClangBuiltin<"__builtin_mips_mulsa_w_ph">,
351
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty],
352
            [IntrNoMem]>;
353
 
354
def int_mips_precr_qb_ph: ClangBuiltin<"__builtin_mips_precr_qb_ph">,
355
  Intrinsic<[llvm_v4i8_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>;
356
def int_mips_precr_sra_ph_w: ClangBuiltin<"__builtin_mips_precr_sra_ph_w">,
357
  Intrinsic<[llvm_v2i16_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
358
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
359
def int_mips_precr_sra_r_ph_w: ClangBuiltin<"__builtin_mips_precr_sra_r_ph_w">,
360
  Intrinsic<[llvm_v2i16_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
361
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
362
 
363
def int_mips_prepend: ClangBuiltin<"__builtin_mips_prepend">,
364
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
365
  [IntrNoMem, ImmArg<ArgIndex<2>>]>;
366
 
367
def int_mips_shra_qb: ClangBuiltin<"__builtin_mips_shra_qb">,
368
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>;
369
def int_mips_shra_r_qb: ClangBuiltin<"__builtin_mips_shra_r_qb">,
370
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>;
371
def int_mips_shrl_ph: ClangBuiltin<"__builtin_mips_shrl_ph">,
372
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_i32_ty], [IntrNoMem]>;
373
 
374
def int_mips_subqh_ph: ClangBuiltin<"__builtin_mips_subqh_ph">,
375
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
376
def int_mips_subqh_r_ph: ClangBuiltin<"__builtin_mips_subqh_r_ph">,
377
  Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>;
378
def int_mips_subqh_w: ClangBuiltin<"__builtin_mips_subqh_w">,
379
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>;
380
def int_mips_subqh_r_w: ClangBuiltin<"__builtin_mips_subqh_r_w">,
381
  Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>;
382
 
383
def int_mips_subu_ph: ClangBuiltin<"__builtin_mips_subu_ph">,
384
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>;
385
def int_mips_subu_s_ph: ClangBuiltin<"__builtin_mips_subu_s_ph">,
386
  Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>;
387
 
388
def int_mips_subuh_qb: ClangBuiltin<"__builtin_mips_subuh_qb">,
389
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>;
390
def int_mips_subuh_r_qb: ClangBuiltin<"__builtin_mips_subuh_r_qb">,
391
  Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>;
392
 
393
//===----------------------------------------------------------------------===//
394
// MIPS MSA
395
 
396
//===----------------------------------------------------------------------===//
397
// Addition/subtraction
398
 
399
def int_mips_add_a_b : ClangBuiltin<"__builtin_msa_add_a_b">,
400
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
401
  [Commutative, IntrNoMem]>;
402
def int_mips_add_a_h : ClangBuiltin<"__builtin_msa_add_a_h">,
403
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
404
  [Commutative, IntrNoMem]>;
405
def int_mips_add_a_w : ClangBuiltin<"__builtin_msa_add_a_w">,
406
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
407
  [Commutative, IntrNoMem]>;
408
def int_mips_add_a_d : ClangBuiltin<"__builtin_msa_add_a_d">,
409
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
410
  [Commutative, IntrNoMem]>;
411
 
412
def int_mips_adds_a_b : ClangBuiltin<"__builtin_msa_adds_a_b">,
413
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
414
  [Commutative, IntrNoMem]>;
415
def int_mips_adds_a_h : ClangBuiltin<"__builtin_msa_adds_a_h">,
416
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
417
  [Commutative, IntrNoMem]>;
418
def int_mips_adds_a_w : ClangBuiltin<"__builtin_msa_adds_a_w">,
419
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
420
  [Commutative, IntrNoMem]>;
421
def int_mips_adds_a_d : ClangBuiltin<"__builtin_msa_adds_a_d">,
422
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
423
  [Commutative, IntrNoMem]>;
424
 
425
def int_mips_adds_s_b : ClangBuiltin<"__builtin_msa_adds_s_b">,
426
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
427
  [Commutative, IntrNoMem]>;
428
def int_mips_adds_s_h : ClangBuiltin<"__builtin_msa_adds_s_h">,
429
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
430
  [Commutative, IntrNoMem]>;
431
def int_mips_adds_s_w : ClangBuiltin<"__builtin_msa_adds_s_w">,
432
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
433
  [Commutative, IntrNoMem]>;
434
def int_mips_adds_s_d : ClangBuiltin<"__builtin_msa_adds_s_d">,
435
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
436
  [Commutative, IntrNoMem]>;
437
 
438
def int_mips_adds_u_b : ClangBuiltin<"__builtin_msa_adds_u_b">,
439
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
440
  [Commutative, IntrNoMem]>;
441
def int_mips_adds_u_h : ClangBuiltin<"__builtin_msa_adds_u_h">,
442
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
443
  [Commutative, IntrNoMem]>;
444
def int_mips_adds_u_w : ClangBuiltin<"__builtin_msa_adds_u_w">,
445
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
446
  [Commutative, IntrNoMem]>;
447
def int_mips_adds_u_d : ClangBuiltin<"__builtin_msa_adds_u_d">,
448
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
449
  [Commutative, IntrNoMem]>;
450
 
451
def int_mips_addv_b : ClangBuiltin<"__builtin_msa_addv_b">,
452
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
453
  [Commutative, IntrNoMem]>;
454
def int_mips_addv_h : ClangBuiltin<"__builtin_msa_addv_h">,
455
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
456
  [Commutative, IntrNoMem]>;
457
def int_mips_addv_w : ClangBuiltin<"__builtin_msa_addv_w">,
458
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
459
  [Commutative, IntrNoMem]>;
460
def int_mips_addv_d : ClangBuiltin<"__builtin_msa_addv_d">,
461
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
462
  [Commutative, IntrNoMem]>;
463
 
464
def int_mips_addvi_b : ClangBuiltin<"__builtin_msa_addvi_b">,
465
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty],
466
  [Commutative, IntrNoMem, ImmArg<ArgIndex<1>>]>;
467
def int_mips_addvi_h : ClangBuiltin<"__builtin_msa_addvi_h">,
468
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty],
469
  [Commutative, IntrNoMem, ImmArg<ArgIndex<1>>]>;
470
def int_mips_addvi_w : ClangBuiltin<"__builtin_msa_addvi_w">,
471
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty],
472
  [Commutative, IntrNoMem, ImmArg<ArgIndex<1>>]>;
473
def int_mips_addvi_d : ClangBuiltin<"__builtin_msa_addvi_d">,
474
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty],
475
  [Commutative, IntrNoMem, ImmArg<ArgIndex<1>>]>;
476
 
477
def int_mips_and_v : ClangBuiltin<"__builtin_msa_and_v">,
478
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
479
 
480
def int_mips_andi_b : ClangBuiltin<"__builtin_msa_andi_b">,
481
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
482
 
483
def int_mips_asub_s_b : ClangBuiltin<"__builtin_msa_asub_s_b">,
484
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
485
def int_mips_asub_s_h : ClangBuiltin<"__builtin_msa_asub_s_h">,
486
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
487
def int_mips_asub_s_w : ClangBuiltin<"__builtin_msa_asub_s_w">,
488
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
489
def int_mips_asub_s_d : ClangBuiltin<"__builtin_msa_asub_s_d">,
490
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
491
 
492
def int_mips_asub_u_b : ClangBuiltin<"__builtin_msa_asub_u_b">,
493
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
494
def int_mips_asub_u_h : ClangBuiltin<"__builtin_msa_asub_u_h">,
495
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
496
def int_mips_asub_u_w : ClangBuiltin<"__builtin_msa_asub_u_w">,
497
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
498
def int_mips_asub_u_d : ClangBuiltin<"__builtin_msa_asub_u_d">,
499
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
500
 
501
def int_mips_ave_s_b : ClangBuiltin<"__builtin_msa_ave_s_b">,
502
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
503
  [Commutative, IntrNoMem]>;
504
def int_mips_ave_s_h : ClangBuiltin<"__builtin_msa_ave_s_h">,
505
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
506
  [Commutative, IntrNoMem]>;
507
def int_mips_ave_s_w : ClangBuiltin<"__builtin_msa_ave_s_w">,
508
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
509
  [Commutative, IntrNoMem]>;
510
def int_mips_ave_s_d : ClangBuiltin<"__builtin_msa_ave_s_d">,
511
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
512
  [Commutative, IntrNoMem]>;
513
 
514
def int_mips_ave_u_b : ClangBuiltin<"__builtin_msa_ave_u_b">,
515
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
516
  [Commutative, IntrNoMem]>;
517
def int_mips_ave_u_h : ClangBuiltin<"__builtin_msa_ave_u_h">,
518
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
519
  [Commutative, IntrNoMem]>;
520
def int_mips_ave_u_w : ClangBuiltin<"__builtin_msa_ave_u_w">,
521
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
522
  [Commutative, IntrNoMem]>;
523
def int_mips_ave_u_d : ClangBuiltin<"__builtin_msa_ave_u_d">,
524
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
525
  [Commutative, IntrNoMem]>;
526
 
527
def int_mips_aver_s_b : ClangBuiltin<"__builtin_msa_aver_s_b">,
528
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
529
  [Commutative, IntrNoMem]>;
530
def int_mips_aver_s_h : ClangBuiltin<"__builtin_msa_aver_s_h">,
531
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
532
  [Commutative, IntrNoMem]>;
533
def int_mips_aver_s_w : ClangBuiltin<"__builtin_msa_aver_s_w">,
534
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
535
  [Commutative, IntrNoMem]>;
536
def int_mips_aver_s_d : ClangBuiltin<"__builtin_msa_aver_s_d">,
537
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
538
  [Commutative, IntrNoMem]>;
539
 
540
def int_mips_aver_u_b : ClangBuiltin<"__builtin_msa_aver_u_b">,
541
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
542
  [Commutative, IntrNoMem]>;
543
def int_mips_aver_u_h : ClangBuiltin<"__builtin_msa_aver_u_h">,
544
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
545
  [Commutative, IntrNoMem]>;
546
def int_mips_aver_u_w : ClangBuiltin<"__builtin_msa_aver_u_w">,
547
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
548
  [Commutative, IntrNoMem]>;
549
def int_mips_aver_u_d : ClangBuiltin<"__builtin_msa_aver_u_d">,
550
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
551
  [Commutative, IntrNoMem]>;
552
 
553
def int_mips_bclr_b : ClangBuiltin<"__builtin_msa_bclr_b">,
554
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
555
def int_mips_bclr_h : ClangBuiltin<"__builtin_msa_bclr_h">,
556
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
557
def int_mips_bclr_w : ClangBuiltin<"__builtin_msa_bclr_w">,
558
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
559
def int_mips_bclr_d : ClangBuiltin<"__builtin_msa_bclr_d">,
560
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
561
 
562
def int_mips_bclri_b : ClangBuiltin<"__builtin_msa_bclri_b">,
563
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
564
def int_mips_bclri_h : ClangBuiltin<"__builtin_msa_bclri_h">,
565
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
566
def int_mips_bclri_w : ClangBuiltin<"__builtin_msa_bclri_w">,
567
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
568
def int_mips_bclri_d : ClangBuiltin<"__builtin_msa_bclri_d">,
569
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
570
 
571
def int_mips_binsl_b : ClangBuiltin<"__builtin_msa_binsl_b">,
572
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
573
            [IntrNoMem]>;
574
def int_mips_binsl_h : ClangBuiltin<"__builtin_msa_binsl_h">,
575
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
576
            [IntrNoMem]>;
577
def int_mips_binsl_w : ClangBuiltin<"__builtin_msa_binsl_w">,
578
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
579
            [IntrNoMem]>;
580
def int_mips_binsl_d : ClangBuiltin<"__builtin_msa_binsl_d">,
581
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
582
            [IntrNoMem]>;
583
 
584
def int_mips_binsli_b : ClangBuiltin<"__builtin_msa_binsli_b">,
585
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
586
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
587
def int_mips_binsli_h : ClangBuiltin<"__builtin_msa_binsli_h">,
588
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty],
589
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
590
def int_mips_binsli_w : ClangBuiltin<"__builtin_msa_binsli_w">,
591
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
592
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
593
def int_mips_binsli_d : ClangBuiltin<"__builtin_msa_binsli_d">,
594
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
595
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
596
 
597
def int_mips_binsr_b : ClangBuiltin<"__builtin_msa_binsr_b">,
598
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
599
            [IntrNoMem]>;
600
def int_mips_binsr_h : ClangBuiltin<"__builtin_msa_binsr_h">,
601
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
602
            [IntrNoMem]>;
603
def int_mips_binsr_w : ClangBuiltin<"__builtin_msa_binsr_w">,
604
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
605
            [IntrNoMem]>;
606
def int_mips_binsr_d : ClangBuiltin<"__builtin_msa_binsr_d">,
607
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
608
            [IntrNoMem]>;
609
 
610
def int_mips_binsri_b : ClangBuiltin<"__builtin_msa_binsri_b">,
611
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
612
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
613
def int_mips_binsri_h : ClangBuiltin<"__builtin_msa_binsri_h">,
614
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty],
615
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
616
def int_mips_binsri_w : ClangBuiltin<"__builtin_msa_binsri_w">,
617
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
618
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
619
def int_mips_binsri_d : ClangBuiltin<"__builtin_msa_binsri_d">,
620
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
621
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
622
 
623
def int_mips_bmnz_v : ClangBuiltin<"__builtin_msa_bmnz_v">,
624
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
625
            [IntrNoMem]>;
626
 
627
def int_mips_bmnzi_b : ClangBuiltin<"__builtin_msa_bmnzi_b">,
628
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
629
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
630
 
631
def int_mips_bmz_v : ClangBuiltin<"__builtin_msa_bmz_v">,
632
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
633
            [IntrNoMem]>;
634
 
635
def int_mips_bmzi_b : ClangBuiltin<"__builtin_msa_bmzi_b">,
636
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
637
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
638
 
639
def int_mips_bneg_b : ClangBuiltin<"__builtin_msa_bneg_b">,
640
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
641
def int_mips_bneg_h : ClangBuiltin<"__builtin_msa_bneg_h">,
642
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
643
def int_mips_bneg_w : ClangBuiltin<"__builtin_msa_bneg_w">,
644
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
645
def int_mips_bneg_d : ClangBuiltin<"__builtin_msa_bneg_d">,
646
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
647
 
648
def int_mips_bnegi_b : ClangBuiltin<"__builtin_msa_bnegi_b">,
649
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
650
def int_mips_bnegi_h : ClangBuiltin<"__builtin_msa_bnegi_h">,
651
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
652
def int_mips_bnegi_w : ClangBuiltin<"__builtin_msa_bnegi_w">,
653
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
654
def int_mips_bnegi_d : ClangBuiltin<"__builtin_msa_bnegi_d">,
655
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
656
 
657
def int_mips_bnz_b : ClangBuiltin<"__builtin_msa_bnz_b">,
658
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
659
def int_mips_bnz_h : ClangBuiltin<"__builtin_msa_bnz_h">,
660
  Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
661
def int_mips_bnz_w : ClangBuiltin<"__builtin_msa_bnz_w">,
662
  Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
663
def int_mips_bnz_d : ClangBuiltin<"__builtin_msa_bnz_d">,
664
  Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty], [IntrNoMem]>;
665
 
666
def int_mips_bnz_v : ClangBuiltin<"__builtin_msa_bnz_v">,
667
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
668
 
669
def int_mips_bsel_v : ClangBuiltin<"__builtin_msa_bsel_v">,
670
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
671
            [IntrNoMem]>;
672
 
673
def int_mips_bseli_b : ClangBuiltin<"__builtin_msa_bseli_b">,
674
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
675
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
676
 
677
def int_mips_bset_b : ClangBuiltin<"__builtin_msa_bset_b">,
678
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
679
def int_mips_bset_h : ClangBuiltin<"__builtin_msa_bset_h">,
680
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
681
def int_mips_bset_w : ClangBuiltin<"__builtin_msa_bset_w">,
682
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
683
def int_mips_bset_d : ClangBuiltin<"__builtin_msa_bset_d">,
684
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
685
 
686
def int_mips_bseti_b : ClangBuiltin<"__builtin_msa_bseti_b">,
687
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
688
def int_mips_bseti_h : ClangBuiltin<"__builtin_msa_bseti_h">,
689
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
690
def int_mips_bseti_w : ClangBuiltin<"__builtin_msa_bseti_w">,
691
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
692
def int_mips_bseti_d : ClangBuiltin<"__builtin_msa_bseti_d">,
693
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
694
 
695
def int_mips_bz_b : ClangBuiltin<"__builtin_msa_bz_b">,
696
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
697
def int_mips_bz_h : ClangBuiltin<"__builtin_msa_bz_h">,
698
  Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
699
def int_mips_bz_w : ClangBuiltin<"__builtin_msa_bz_w">,
700
  Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
701
def int_mips_bz_d : ClangBuiltin<"__builtin_msa_bz_d">,
702
  Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty], [IntrNoMem]>;
703
 
704
def int_mips_bz_v : ClangBuiltin<"__builtin_msa_bz_v">,
705
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
706
 
707
def int_mips_ceq_b : ClangBuiltin<"__builtin_msa_ceq_b">,
708
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
709
def int_mips_ceq_h : ClangBuiltin<"__builtin_msa_ceq_h">,
710
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
711
def int_mips_ceq_w : ClangBuiltin<"__builtin_msa_ceq_w">,
712
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
713
def int_mips_ceq_d : ClangBuiltin<"__builtin_msa_ceq_d">,
714
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
715
 
716
def int_mips_ceqi_b : ClangBuiltin<"__builtin_msa_ceqi_b">,
717
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
718
def int_mips_ceqi_h : ClangBuiltin<"__builtin_msa_ceqi_h">,
719
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
720
def int_mips_ceqi_w : ClangBuiltin<"__builtin_msa_ceqi_w">,
721
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
722
def int_mips_ceqi_d : ClangBuiltin<"__builtin_msa_ceqi_d">,
723
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
724
 
725
def int_mips_cfcmsa : ClangBuiltin<"__builtin_msa_cfcmsa">,
726
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [ImmArg<ArgIndex<0>>]>;
727
 
728
def int_mips_cle_s_b : ClangBuiltin<"__builtin_msa_cle_s_b">,
729
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
730
def int_mips_cle_s_h : ClangBuiltin<"__builtin_msa_cle_s_h">,
731
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
732
def int_mips_cle_s_w : ClangBuiltin<"__builtin_msa_cle_s_w">,
733
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
734
def int_mips_cle_s_d : ClangBuiltin<"__builtin_msa_cle_s_d">,
735
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
736
 
737
def int_mips_cle_u_b : ClangBuiltin<"__builtin_msa_cle_u_b">,
738
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
739
def int_mips_cle_u_h : ClangBuiltin<"__builtin_msa_cle_u_h">,
740
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
741
def int_mips_cle_u_w : ClangBuiltin<"__builtin_msa_cle_u_w">,
742
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
743
def int_mips_cle_u_d : ClangBuiltin<"__builtin_msa_cle_u_d">,
744
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
745
 
746
def int_mips_clei_s_b : ClangBuiltin<"__builtin_msa_clei_s_b">,
747
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
748
def int_mips_clei_s_h : ClangBuiltin<"__builtin_msa_clei_s_h">,
749
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
750
def int_mips_clei_s_w : ClangBuiltin<"__builtin_msa_clei_s_w">,
751
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
752
def int_mips_clei_s_d : ClangBuiltin<"__builtin_msa_clei_s_d">,
753
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
754
 
755
def int_mips_clei_u_b : ClangBuiltin<"__builtin_msa_clei_u_b">,
756
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
757
def int_mips_clei_u_h : ClangBuiltin<"__builtin_msa_clei_u_h">,
758
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
759
def int_mips_clei_u_w : ClangBuiltin<"__builtin_msa_clei_u_w">,
760
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
761
def int_mips_clei_u_d : ClangBuiltin<"__builtin_msa_clei_u_d">,
762
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
763
 
764
def int_mips_clt_s_b : ClangBuiltin<"__builtin_msa_clt_s_b">,
765
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
766
def int_mips_clt_s_h : ClangBuiltin<"__builtin_msa_clt_s_h">,
767
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
768
def int_mips_clt_s_w : ClangBuiltin<"__builtin_msa_clt_s_w">,
769
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
770
def int_mips_clt_s_d : ClangBuiltin<"__builtin_msa_clt_s_d">,
771
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
772
 
773
def int_mips_clt_u_b : ClangBuiltin<"__builtin_msa_clt_u_b">,
774
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
775
def int_mips_clt_u_h : ClangBuiltin<"__builtin_msa_clt_u_h">,
776
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
777
def int_mips_clt_u_w : ClangBuiltin<"__builtin_msa_clt_u_w">,
778
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
779
def int_mips_clt_u_d : ClangBuiltin<"__builtin_msa_clt_u_d">,
780
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
781
 
782
def int_mips_clti_s_b : ClangBuiltin<"__builtin_msa_clti_s_b">,
783
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
784
def int_mips_clti_s_h : ClangBuiltin<"__builtin_msa_clti_s_h">,
785
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
786
def int_mips_clti_s_w : ClangBuiltin<"__builtin_msa_clti_s_w">,
787
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
788
def int_mips_clti_s_d : ClangBuiltin<"__builtin_msa_clti_s_d">,
789
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
790
 
791
def int_mips_clti_u_b : ClangBuiltin<"__builtin_msa_clti_u_b">,
792
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
793
def int_mips_clti_u_h : ClangBuiltin<"__builtin_msa_clti_u_h">,
794
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
795
def int_mips_clti_u_w : ClangBuiltin<"__builtin_msa_clti_u_w">,
796
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
797
def int_mips_clti_u_d : ClangBuiltin<"__builtin_msa_clti_u_d">,
798
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
799
 
800
def int_mips_copy_s_b : ClangBuiltin<"__builtin_msa_copy_s_b">,
801
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
802
def int_mips_copy_s_h : ClangBuiltin<"__builtin_msa_copy_s_h">,
803
  Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
804
def int_mips_copy_s_w : ClangBuiltin<"__builtin_msa_copy_s_w">,
805
  Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
806
def int_mips_copy_s_d : ClangBuiltin<"__builtin_msa_copy_s_d">,
807
  Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
808
 
809
def int_mips_copy_u_b : ClangBuiltin<"__builtin_msa_copy_u_b">,
810
  Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
811
def int_mips_copy_u_h : ClangBuiltin<"__builtin_msa_copy_u_h">,
812
  Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
813
def int_mips_copy_u_w : ClangBuiltin<"__builtin_msa_copy_u_w">,
814
  Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
815
def int_mips_copy_u_d : ClangBuiltin<"__builtin_msa_copy_u_d">,
816
  Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
817
 
818
def int_mips_ctcmsa : ClangBuiltin<"__builtin_msa_ctcmsa">,
819
  Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<ArgIndex<0>>]>;
820
 
821
def int_mips_div_s_b : ClangBuiltin<"__builtin_msa_div_s_b">,
822
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
823
def int_mips_div_s_h : ClangBuiltin<"__builtin_msa_div_s_h">,
824
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
825
def int_mips_div_s_w : ClangBuiltin<"__builtin_msa_div_s_w">,
826
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
827
def int_mips_div_s_d : ClangBuiltin<"__builtin_msa_div_s_d">,
828
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
829
 
830
def int_mips_div_u_b : ClangBuiltin<"__builtin_msa_div_u_b">,
831
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
832
def int_mips_div_u_h : ClangBuiltin<"__builtin_msa_div_u_h">,
833
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
834
def int_mips_div_u_w : ClangBuiltin<"__builtin_msa_div_u_w">,
835
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
836
def int_mips_div_u_d : ClangBuiltin<"__builtin_msa_div_u_d">,
837
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
838
 
839
// This instruction is part of the MSA spec but it does not share the
840
// __builtin_msa prefix because it operates on GP registers.
841
def int_mips_dlsa : ClangBuiltin<"__builtin_mips_dlsa">,
842
  Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty],
843
            [IntrNoMem]>;
844
 
845
def int_mips_dotp_s_h : ClangBuiltin<"__builtin_msa_dotp_s_h">,
846
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
847
def int_mips_dotp_s_w : ClangBuiltin<"__builtin_msa_dotp_s_w">,
848
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
849
def int_mips_dotp_s_d : ClangBuiltin<"__builtin_msa_dotp_s_d">,
850
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
851
 
852
def int_mips_dotp_u_h : ClangBuiltin<"__builtin_msa_dotp_u_h">,
853
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
854
def int_mips_dotp_u_w : ClangBuiltin<"__builtin_msa_dotp_u_w">,
855
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
856
def int_mips_dotp_u_d : ClangBuiltin<"__builtin_msa_dotp_u_d">,
857
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
858
 
859
def int_mips_dpadd_s_h : ClangBuiltin<"__builtin_msa_dpadd_s_h">,
860
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty],
861
  [IntrNoMem]>;
862
def int_mips_dpadd_s_w : ClangBuiltin<"__builtin_msa_dpadd_s_w">,
863
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
864
  [IntrNoMem]>;
865
def int_mips_dpadd_s_d : ClangBuiltin<"__builtin_msa_dpadd_s_d">,
866
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty],
867
  [IntrNoMem]>;
868
 
869
def int_mips_dpadd_u_h : ClangBuiltin<"__builtin_msa_dpadd_u_h">,
870
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty],
871
  [IntrNoMem]>;
872
def int_mips_dpadd_u_w : ClangBuiltin<"__builtin_msa_dpadd_u_w">,
873
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
874
  [IntrNoMem]>;
875
def int_mips_dpadd_u_d : ClangBuiltin<"__builtin_msa_dpadd_u_d">,
876
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty],
877
  [IntrNoMem]>;
878
 
879
def int_mips_dpsub_s_h : ClangBuiltin<"__builtin_msa_dpsub_s_h">,
880
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty],
881
  [IntrNoMem]>;
882
def int_mips_dpsub_s_w : ClangBuiltin<"__builtin_msa_dpsub_s_w">,
883
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
884
  [IntrNoMem]>;
885
def int_mips_dpsub_s_d : ClangBuiltin<"__builtin_msa_dpsub_s_d">,
886
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty],
887
  [IntrNoMem]>;
888
 
889
def int_mips_dpsub_u_h : ClangBuiltin<"__builtin_msa_dpsub_u_h">,
890
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty],
891
  [IntrNoMem]>;
892
def int_mips_dpsub_u_w : ClangBuiltin<"__builtin_msa_dpsub_u_w">,
893
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
894
  [IntrNoMem]>;
895
def int_mips_dpsub_u_d : ClangBuiltin<"__builtin_msa_dpsub_u_d">,
896
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty],
897
  [IntrNoMem]>;
898
 
899
def int_mips_fadd_w : ClangBuiltin<"__builtin_msa_fadd_w">,
900
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
901
def int_mips_fadd_d : ClangBuiltin<"__builtin_msa_fadd_d">,
902
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
903
 
904
def int_mips_fcaf_w : ClangBuiltin<"__builtin_msa_fcaf_w">,
905
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
906
def int_mips_fcaf_d : ClangBuiltin<"__builtin_msa_fcaf_d">,
907
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
908
 
909
def int_mips_fceq_w : ClangBuiltin<"__builtin_msa_fceq_w">,
910
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
911
def int_mips_fceq_d : ClangBuiltin<"__builtin_msa_fceq_d">,
912
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
913
 
914
def int_mips_fcle_w : ClangBuiltin<"__builtin_msa_fcle_w">,
915
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
916
def int_mips_fcle_d : ClangBuiltin<"__builtin_msa_fcle_d">,
917
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
918
 
919
def int_mips_fclt_w : ClangBuiltin<"__builtin_msa_fclt_w">,
920
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
921
def int_mips_fclt_d : ClangBuiltin<"__builtin_msa_fclt_d">,
922
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
923
 
924
def int_mips_fclass_w : ClangBuiltin<"__builtin_msa_fclass_w">,
925
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
926
def int_mips_fclass_d : ClangBuiltin<"__builtin_msa_fclass_d">,
927
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
928
 
929
def int_mips_fcne_w : ClangBuiltin<"__builtin_msa_fcne_w">,
930
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
931
def int_mips_fcne_d : ClangBuiltin<"__builtin_msa_fcne_d">,
932
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
933
 
934
def int_mips_fcor_w : ClangBuiltin<"__builtin_msa_fcor_w">,
935
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
936
def int_mips_fcor_d : ClangBuiltin<"__builtin_msa_fcor_d">,
937
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
938
 
939
def int_mips_fcueq_w : ClangBuiltin<"__builtin_msa_fcueq_w">,
940
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
941
def int_mips_fcueq_d : ClangBuiltin<"__builtin_msa_fcueq_d">,
942
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
943
 
944
def int_mips_fcule_w : ClangBuiltin<"__builtin_msa_fcule_w">,
945
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
946
def int_mips_fcule_d : ClangBuiltin<"__builtin_msa_fcule_d">,
947
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
948
 
949
def int_mips_fcult_w : ClangBuiltin<"__builtin_msa_fcult_w">,
950
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
951
def int_mips_fcult_d : ClangBuiltin<"__builtin_msa_fcult_d">,
952
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
953
 
954
def int_mips_fcun_w : ClangBuiltin<"__builtin_msa_fcun_w">,
955
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
956
def int_mips_fcun_d : ClangBuiltin<"__builtin_msa_fcun_d">,
957
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
958
 
959
def int_mips_fcune_w : ClangBuiltin<"__builtin_msa_fcune_w">,
960
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
961
def int_mips_fcune_d : ClangBuiltin<"__builtin_msa_fcune_d">,
962
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
963
 
964
def int_mips_fdiv_w : ClangBuiltin<"__builtin_msa_fdiv_w">,
965
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
966
def int_mips_fdiv_d : ClangBuiltin<"__builtin_msa_fdiv_d">,
967
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
968
 
969
def int_mips_fexdo_h : ClangBuiltin<"__builtin_msa_fexdo_h">,
970
  Intrinsic<[llvm_v8f16_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
971
def int_mips_fexdo_w : ClangBuiltin<"__builtin_msa_fexdo_w">,
972
  Intrinsic<[llvm_v4f32_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
973
 
974
def int_mips_fexp2_w : ClangBuiltin<"__builtin_msa_fexp2_w">,
975
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4i32_ty], [IntrNoMem]>;
976
def int_mips_fexp2_d : ClangBuiltin<"__builtin_msa_fexp2_d">,
977
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2i64_ty], [IntrNoMem]>;
978
 
979
def int_mips_fexupl_w : ClangBuiltin<"__builtin_msa_fexupl_w">,
980
  Intrinsic<[llvm_v4f32_ty], [llvm_v8f16_ty], [IntrNoMem]>;
981
def int_mips_fexupl_d : ClangBuiltin<"__builtin_msa_fexupl_d">,
982
  Intrinsic<[llvm_v2f64_ty], [llvm_v4f32_ty], [IntrNoMem]>;
983
 
984
def int_mips_fexupr_w : ClangBuiltin<"__builtin_msa_fexupr_w">,
985
  Intrinsic<[llvm_v4f32_ty], [llvm_v8f16_ty], [IntrNoMem]>;
986
def int_mips_fexupr_d : ClangBuiltin<"__builtin_msa_fexupr_d">,
987
  Intrinsic<[llvm_v2f64_ty], [llvm_v4f32_ty], [IntrNoMem]>;
988
 
989
def int_mips_ffint_s_w : ClangBuiltin<"__builtin_msa_ffint_s_w">,
990
  Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
991
def int_mips_ffint_s_d : ClangBuiltin<"__builtin_msa_ffint_s_d">,
992
  Intrinsic<[llvm_v2f64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
993
 
994
def int_mips_ffint_u_w : ClangBuiltin<"__builtin_msa_ffint_u_w">,
995
  Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
996
def int_mips_ffint_u_d : ClangBuiltin<"__builtin_msa_ffint_u_d">,
997
  Intrinsic<[llvm_v2f64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
998
 
999
def int_mips_ffql_w : ClangBuiltin<"__builtin_msa_ffql_w">,
1000
  Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
1001
def int_mips_ffql_d : ClangBuiltin<"__builtin_msa_ffql_d">,
1002
  Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty], [IntrNoMem]>;
1003
 
1004
def int_mips_ffqr_w : ClangBuiltin<"__builtin_msa_ffqr_w">,
1005
  Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
1006
def int_mips_ffqr_d : ClangBuiltin<"__builtin_msa_ffqr_d">,
1007
  Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty], [IntrNoMem]>;
1008
 
1009
def int_mips_fill_b : ClangBuiltin<"__builtin_msa_fill_b">,
1010
  Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty], [IntrNoMem]>;
1011
def int_mips_fill_h : ClangBuiltin<"__builtin_msa_fill_h">,
1012
  Intrinsic<[llvm_v8i16_ty], [llvm_i32_ty], [IntrNoMem]>;
1013
def int_mips_fill_w : ClangBuiltin<"__builtin_msa_fill_w">,
1014
  Intrinsic<[llvm_v4i32_ty], [llvm_i32_ty], [IntrNoMem]>;
1015
def int_mips_fill_d : ClangBuiltin<"__builtin_msa_fill_d">,
1016
  Intrinsic<[llvm_v2i64_ty], [llvm_i64_ty], [IntrNoMem]>;
1017
 
1018
def int_mips_flog2_w : ClangBuiltin<"__builtin_msa_flog2_w">,
1019
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1020
def int_mips_flog2_d : ClangBuiltin<"__builtin_msa_flog2_d">,
1021
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1022
 
1023
def int_mips_fmadd_w : ClangBuiltin<"__builtin_msa_fmadd_w">,
1024
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
1025
            [IntrNoMem]>;
1026
def int_mips_fmadd_d : ClangBuiltin<"__builtin_msa_fmadd_d">,
1027
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty],
1028
            [IntrNoMem]>;
1029
 
1030
def int_mips_fmax_w : ClangBuiltin<"__builtin_msa_fmax_w">,
1031
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1032
def int_mips_fmax_d : ClangBuiltin<"__builtin_msa_fmax_d">,
1033
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1034
 
1035
def int_mips_fmax_a_w : ClangBuiltin<"__builtin_msa_fmax_a_w">,
1036
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1037
def int_mips_fmax_a_d : ClangBuiltin<"__builtin_msa_fmax_a_d">,
1038
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1039
 
1040
def int_mips_fmin_w : ClangBuiltin<"__builtin_msa_fmin_w">,
1041
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1042
def int_mips_fmin_d : ClangBuiltin<"__builtin_msa_fmin_d">,
1043
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1044
 
1045
def int_mips_fmin_a_w : ClangBuiltin<"__builtin_msa_fmin_a_w">,
1046
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1047
def int_mips_fmin_a_d : ClangBuiltin<"__builtin_msa_fmin_a_d">,
1048
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1049
 
1050
def int_mips_fmsub_w : ClangBuiltin<"__builtin_msa_fmsub_w">,
1051
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
1052
            [IntrNoMem]>;
1053
def int_mips_fmsub_d : ClangBuiltin<"__builtin_msa_fmsub_d">,
1054
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty],
1055
            [IntrNoMem]>;
1056
 
1057
def int_mips_fmul_w : ClangBuiltin<"__builtin_msa_fmul_w">,
1058
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1059
def int_mips_fmul_d : ClangBuiltin<"__builtin_msa_fmul_d">,
1060
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1061
 
1062
def int_mips_frint_w : ClangBuiltin<"__builtin_msa_frint_w">,
1063
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1064
def int_mips_frint_d : ClangBuiltin<"__builtin_msa_frint_d">,
1065
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1066
 
1067
def int_mips_frcp_w : ClangBuiltin<"__builtin_msa_frcp_w">,
1068
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1069
def int_mips_frcp_d : ClangBuiltin<"__builtin_msa_frcp_d">,
1070
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1071
 
1072
def int_mips_frsqrt_w : ClangBuiltin<"__builtin_msa_frsqrt_w">,
1073
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1074
def int_mips_frsqrt_d : ClangBuiltin<"__builtin_msa_frsqrt_d">,
1075
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1076
 
1077
def int_mips_fsaf_w : ClangBuiltin<"__builtin_msa_fsaf_w">,
1078
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1079
def int_mips_fsaf_d : ClangBuiltin<"__builtin_msa_fsaf_d">,
1080
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1081
 
1082
def int_mips_fseq_w : ClangBuiltin<"__builtin_msa_fseq_w">,
1083
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1084
def int_mips_fseq_d : ClangBuiltin<"__builtin_msa_fseq_d">,
1085
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1086
 
1087
def int_mips_fsle_w : ClangBuiltin<"__builtin_msa_fsle_w">,
1088
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1089
def int_mips_fsle_d : ClangBuiltin<"__builtin_msa_fsle_d">,
1090
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1091
 
1092
def int_mips_fslt_w : ClangBuiltin<"__builtin_msa_fslt_w">,
1093
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1094
def int_mips_fslt_d : ClangBuiltin<"__builtin_msa_fslt_d">,
1095
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1096
 
1097
def int_mips_fsne_w : ClangBuiltin<"__builtin_msa_fsne_w">,
1098
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1099
def int_mips_fsne_d : ClangBuiltin<"__builtin_msa_fsne_d">,
1100
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1101
 
1102
def int_mips_fsor_w : ClangBuiltin<"__builtin_msa_fsor_w">,
1103
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1104
def int_mips_fsor_d : ClangBuiltin<"__builtin_msa_fsor_d">,
1105
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1106
 
1107
def int_mips_fsqrt_w : ClangBuiltin<"__builtin_msa_fsqrt_w">,
1108
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1109
def int_mips_fsqrt_d : ClangBuiltin<"__builtin_msa_fsqrt_d">,
1110
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1111
 
1112
def int_mips_fsub_w : ClangBuiltin<"__builtin_msa_fsub_w">,
1113
  Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1114
def int_mips_fsub_d : ClangBuiltin<"__builtin_msa_fsub_d">,
1115
  Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1116
 
1117
def int_mips_fsueq_w : ClangBuiltin<"__builtin_msa_fsueq_w">,
1118
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1119
def int_mips_fsueq_d : ClangBuiltin<"__builtin_msa_fsueq_d">,
1120
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1121
 
1122
def int_mips_fsule_w : ClangBuiltin<"__builtin_msa_fsule_w">,
1123
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1124
def int_mips_fsule_d : ClangBuiltin<"__builtin_msa_fsule_d">,
1125
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1126
 
1127
def int_mips_fsult_w : ClangBuiltin<"__builtin_msa_fsult_w">,
1128
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1129
def int_mips_fsult_d : ClangBuiltin<"__builtin_msa_fsult_d">,
1130
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1131
 
1132
def int_mips_fsun_w : ClangBuiltin<"__builtin_msa_fsun_w">,
1133
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1134
def int_mips_fsun_d : ClangBuiltin<"__builtin_msa_fsun_d">,
1135
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1136
 
1137
def int_mips_fsune_w : ClangBuiltin<"__builtin_msa_fsune_w">,
1138
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1139
def int_mips_fsune_d : ClangBuiltin<"__builtin_msa_fsune_d">,
1140
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1141
 
1142
def int_mips_ftint_s_w : ClangBuiltin<"__builtin_msa_ftint_s_w">,
1143
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1144
def int_mips_ftint_s_d : ClangBuiltin<"__builtin_msa_ftint_s_d">,
1145
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1146
 
1147
def int_mips_ftint_u_w : ClangBuiltin<"__builtin_msa_ftint_u_w">,
1148
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1149
def int_mips_ftint_u_d : ClangBuiltin<"__builtin_msa_ftint_u_d">,
1150
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1151
 
1152
def int_mips_ftq_h : ClangBuiltin<"__builtin_msa_ftq_h">,
1153
  Intrinsic<[llvm_v8i16_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
1154
def int_mips_ftq_w : ClangBuiltin<"__builtin_msa_ftq_w">,
1155
  Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
1156
 
1157
def int_mips_ftrunc_s_w : ClangBuiltin<"__builtin_msa_ftrunc_s_w">,
1158
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1159
def int_mips_ftrunc_s_d : ClangBuiltin<"__builtin_msa_ftrunc_s_d">,
1160
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1161
 
1162
def int_mips_ftrunc_u_w : ClangBuiltin<"__builtin_msa_ftrunc_u_w">,
1163
  Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
1164
def int_mips_ftrunc_u_d : ClangBuiltin<"__builtin_msa_ftrunc_u_d">,
1165
  Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
1166
 
1167
def int_mips_hadd_s_h : ClangBuiltin<"__builtin_msa_hadd_s_h">,
1168
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1169
def int_mips_hadd_s_w : ClangBuiltin<"__builtin_msa_hadd_s_w">,
1170
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1171
def int_mips_hadd_s_d : ClangBuiltin<"__builtin_msa_hadd_s_d">,
1172
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1173
 
1174
def int_mips_hadd_u_h : ClangBuiltin<"__builtin_msa_hadd_u_h">,
1175
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1176
def int_mips_hadd_u_w : ClangBuiltin<"__builtin_msa_hadd_u_w">,
1177
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1178
def int_mips_hadd_u_d : ClangBuiltin<"__builtin_msa_hadd_u_d">,
1179
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1180
 
1181
def int_mips_hsub_s_h : ClangBuiltin<"__builtin_msa_hsub_s_h">,
1182
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1183
def int_mips_hsub_s_w : ClangBuiltin<"__builtin_msa_hsub_s_w">,
1184
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1185
def int_mips_hsub_s_d : ClangBuiltin<"__builtin_msa_hsub_s_d">,
1186
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1187
 
1188
def int_mips_hsub_u_h : ClangBuiltin<"__builtin_msa_hsub_u_h">,
1189
  Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1190
def int_mips_hsub_u_w : ClangBuiltin<"__builtin_msa_hsub_u_w">,
1191
  Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1192
def int_mips_hsub_u_d : ClangBuiltin<"__builtin_msa_hsub_u_d">,
1193
  Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1194
 
1195
def int_mips_ilvev_b : ClangBuiltin<"__builtin_msa_ilvev_b">,
1196
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1197
def int_mips_ilvev_h : ClangBuiltin<"__builtin_msa_ilvev_h">,
1198
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1199
def int_mips_ilvev_w : ClangBuiltin<"__builtin_msa_ilvev_w">,
1200
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1201
def int_mips_ilvev_d : ClangBuiltin<"__builtin_msa_ilvev_d">,
1202
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1203
 
1204
def int_mips_ilvl_b : ClangBuiltin<"__builtin_msa_ilvl_b">,
1205
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1206
def int_mips_ilvl_h : ClangBuiltin<"__builtin_msa_ilvl_h">,
1207
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1208
def int_mips_ilvl_w : ClangBuiltin<"__builtin_msa_ilvl_w">,
1209
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1210
def int_mips_ilvl_d : ClangBuiltin<"__builtin_msa_ilvl_d">,
1211
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1212
 
1213
def int_mips_ilvod_b : ClangBuiltin<"__builtin_msa_ilvod_b">,
1214
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1215
def int_mips_ilvod_h : ClangBuiltin<"__builtin_msa_ilvod_h">,
1216
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1217
def int_mips_ilvod_w : ClangBuiltin<"__builtin_msa_ilvod_w">,
1218
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1219
def int_mips_ilvod_d : ClangBuiltin<"__builtin_msa_ilvod_d">,
1220
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1221
 
1222
def int_mips_ilvr_b : ClangBuiltin<"__builtin_msa_ilvr_b">,
1223
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1224
def int_mips_ilvr_h : ClangBuiltin<"__builtin_msa_ilvr_h">,
1225
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1226
def int_mips_ilvr_w : ClangBuiltin<"__builtin_msa_ilvr_w">,
1227
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1228
def int_mips_ilvr_d : ClangBuiltin<"__builtin_msa_ilvr_d">,
1229
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1230
 
1231
def int_mips_insert_b : ClangBuiltin<"__builtin_msa_insert_b">,
1232
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty],
1233
  [IntrNoMem]>;
1234
def int_mips_insert_h : ClangBuiltin<"__builtin_msa_insert_h">,
1235
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty, llvm_i32_ty],
1236
  [IntrNoMem]>;
1237
def int_mips_insert_w : ClangBuiltin<"__builtin_msa_insert_w">,
1238
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty],
1239
  [IntrNoMem]>;
1240
def int_mips_insert_d : ClangBuiltin<"__builtin_msa_insert_d">,
1241
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty, llvm_i64_ty],
1242
  [IntrNoMem]>;
1243
 
1244
def int_mips_insve_b : ClangBuiltin<"__builtin_msa_insve_b">,
1245
  Intrinsic<[llvm_v16i8_ty],
1246
            [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty],
1247
            [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1248
def int_mips_insve_h : ClangBuiltin<"__builtin_msa_insve_h">,
1249
  Intrinsic<[llvm_v8i16_ty],
1250
            [llvm_v8i16_ty, llvm_i32_ty, llvm_v8i16_ty],
1251
            [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1252
def int_mips_insve_w : ClangBuiltin<"__builtin_msa_insve_w">,
1253
  Intrinsic<[llvm_v4i32_ty],
1254
            [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty],
1255
            [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1256
def int_mips_insve_d : ClangBuiltin<"__builtin_msa_insve_d">,
1257
  Intrinsic<[llvm_v2i64_ty],
1258
            [llvm_v2i64_ty, llvm_i32_ty, llvm_v2i64_ty],
1259
            [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1260
 
1261
def int_mips_ld_b : ClangBuiltin<"__builtin_msa_ld_b">,
1262
  Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty, llvm_i32_ty],
1263
  [IntrReadMem, IntrArgMemOnly]>;
1264
def int_mips_ld_h : ClangBuiltin<"__builtin_msa_ld_h">,
1265
  Intrinsic<[llvm_v8i16_ty], [llvm_ptr_ty, llvm_i32_ty],
1266
  [IntrReadMem, IntrArgMemOnly]>;
1267
def int_mips_ld_w : ClangBuiltin<"__builtin_msa_ld_w">,
1268
  Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i32_ty],
1269
  [IntrReadMem, IntrArgMemOnly]>;
1270
def int_mips_ld_d : ClangBuiltin<"__builtin_msa_ld_d">,
1271
  Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_i32_ty],
1272
  [IntrReadMem, IntrArgMemOnly]>;
1273
 
1274
def int_mips_ldr_d : ClangBuiltin<"__builtin_msa_ldr_d">,
1275
  Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_i32_ty],
1276
  [IntrReadMem, IntrArgMemOnly]>;
1277
def int_mips_ldr_w : ClangBuiltin<"__builtin_msa_ldr_w">,
1278
  Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i32_ty],
1279
  [IntrReadMem, IntrArgMemOnly]>;
1280
 
1281
def int_mips_ldi_b : ClangBuiltin<"__builtin_msa_ldi_b">,
1282
  Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<0>>]>;
1283
def int_mips_ldi_h : ClangBuiltin<"__builtin_msa_ldi_h">,
1284
  Intrinsic<[llvm_v8i16_ty], [llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<0>>]>;
1285
def int_mips_ldi_w : ClangBuiltin<"__builtin_msa_ldi_w">,
1286
  Intrinsic<[llvm_v4i32_ty], [llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<0>>]>;
1287
def int_mips_ldi_d : ClangBuiltin<"__builtin_msa_ldi_d">,
1288
  Intrinsic<[llvm_v2i64_ty], [llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<0>>]>;
1289
 
1290
// This instruction is part of the MSA spec but it does not share the
1291
// __builtin_msa prefix because it operates on the GPR registers.
1292
def int_mips_lsa : ClangBuiltin<"__builtin_mips_lsa">,
1293
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1294
            [IntrNoMem]>;
1295
 
1296
def int_mips_madd_q_h : ClangBuiltin<"__builtin_msa_madd_q_h">,
1297
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1298
  [IntrNoMem]>;
1299
def int_mips_madd_q_w : ClangBuiltin<"__builtin_msa_madd_q_w">,
1300
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1301
  [IntrNoMem]>;
1302
 
1303
def int_mips_maddr_q_h : ClangBuiltin<"__builtin_msa_maddr_q_h">,
1304
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1305
  [IntrNoMem]>;
1306
def int_mips_maddr_q_w : ClangBuiltin<"__builtin_msa_maddr_q_w">,
1307
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1308
  [IntrNoMem]>;
1309
 
1310
def int_mips_maddv_b : ClangBuiltin<"__builtin_msa_maddv_b">,
1311
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
1312
  [IntrNoMem]>;
1313
def int_mips_maddv_h : ClangBuiltin<"__builtin_msa_maddv_h">,
1314
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1315
  [IntrNoMem]>;
1316
def int_mips_maddv_w : ClangBuiltin<"__builtin_msa_maddv_w">,
1317
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1318
  [IntrNoMem]>;
1319
def int_mips_maddv_d : ClangBuiltin<"__builtin_msa_maddv_d">,
1320
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
1321
  [IntrNoMem]>;
1322
 
1323
def int_mips_max_a_b : ClangBuiltin<"__builtin_msa_max_a_b">,
1324
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1325
def int_mips_max_a_h : ClangBuiltin<"__builtin_msa_max_a_h">,
1326
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1327
def int_mips_max_a_w : ClangBuiltin<"__builtin_msa_max_a_w">,
1328
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1329
def int_mips_max_a_d : ClangBuiltin<"__builtin_msa_max_a_d">,
1330
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1331
 
1332
def int_mips_max_s_b : ClangBuiltin<"__builtin_msa_max_s_b">,
1333
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1334
def int_mips_max_s_h : ClangBuiltin<"__builtin_msa_max_s_h">,
1335
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1336
def int_mips_max_s_w : ClangBuiltin<"__builtin_msa_max_s_w">,
1337
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1338
def int_mips_max_s_d : ClangBuiltin<"__builtin_msa_max_s_d">,
1339
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1340
 
1341
def int_mips_max_u_b : ClangBuiltin<"__builtin_msa_max_u_b">,
1342
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1343
def int_mips_max_u_h : ClangBuiltin<"__builtin_msa_max_u_h">,
1344
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1345
def int_mips_max_u_w : ClangBuiltin<"__builtin_msa_max_u_w">,
1346
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1347
def int_mips_max_u_d : ClangBuiltin<"__builtin_msa_max_u_d">,
1348
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1349
 
1350
def int_mips_maxi_s_b : ClangBuiltin<"__builtin_msa_maxi_s_b">,
1351
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1352
def int_mips_maxi_s_h : ClangBuiltin<"__builtin_msa_maxi_s_h">,
1353
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1354
def int_mips_maxi_s_w : ClangBuiltin<"__builtin_msa_maxi_s_w">,
1355
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1356
def int_mips_maxi_s_d : ClangBuiltin<"__builtin_msa_maxi_s_d">,
1357
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1358
 
1359
def int_mips_maxi_u_b : ClangBuiltin<"__builtin_msa_maxi_u_b">,
1360
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1361
def int_mips_maxi_u_h : ClangBuiltin<"__builtin_msa_maxi_u_h">,
1362
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1363
def int_mips_maxi_u_w : ClangBuiltin<"__builtin_msa_maxi_u_w">,
1364
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1365
def int_mips_maxi_u_d : ClangBuiltin<"__builtin_msa_maxi_u_d">,
1366
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1367
 
1368
def int_mips_min_a_b : ClangBuiltin<"__builtin_msa_min_a_b">,
1369
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1370
def int_mips_min_a_h : ClangBuiltin<"__builtin_msa_min_a_h">,
1371
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1372
def int_mips_min_a_w : ClangBuiltin<"__builtin_msa_min_a_w">,
1373
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1374
def int_mips_min_a_d : ClangBuiltin<"__builtin_msa_min_a_d">,
1375
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1376
 
1377
def int_mips_min_s_b : ClangBuiltin<"__builtin_msa_min_s_b">,
1378
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1379
def int_mips_min_s_h : ClangBuiltin<"__builtin_msa_min_s_h">,
1380
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1381
def int_mips_min_s_w : ClangBuiltin<"__builtin_msa_min_s_w">,
1382
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1383
def int_mips_min_s_d : ClangBuiltin<"__builtin_msa_min_s_d">,
1384
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1385
 
1386
def int_mips_min_u_b : ClangBuiltin<"__builtin_msa_min_u_b">,
1387
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1388
def int_mips_min_u_h : ClangBuiltin<"__builtin_msa_min_u_h">,
1389
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1390
def int_mips_min_u_w : ClangBuiltin<"__builtin_msa_min_u_w">,
1391
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1392
def int_mips_min_u_d : ClangBuiltin<"__builtin_msa_min_u_d">,
1393
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1394
 
1395
def int_mips_mini_s_b : ClangBuiltin<"__builtin_msa_mini_s_b">,
1396
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1397
def int_mips_mini_s_h : ClangBuiltin<"__builtin_msa_mini_s_h">,
1398
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1399
def int_mips_mini_s_w : ClangBuiltin<"__builtin_msa_mini_s_w">,
1400
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1401
def int_mips_mini_s_d : ClangBuiltin<"__builtin_msa_mini_s_d">,
1402
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1403
 
1404
def int_mips_mini_u_b : ClangBuiltin<"__builtin_msa_mini_u_b">,
1405
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1406
def int_mips_mini_u_h : ClangBuiltin<"__builtin_msa_mini_u_h">,
1407
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1408
def int_mips_mini_u_w : ClangBuiltin<"__builtin_msa_mini_u_w">,
1409
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1410
def int_mips_mini_u_d : ClangBuiltin<"__builtin_msa_mini_u_d">,
1411
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1412
 
1413
def int_mips_mod_s_b : ClangBuiltin<"__builtin_msa_mod_s_b">,
1414
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1415
def int_mips_mod_s_h : ClangBuiltin<"__builtin_msa_mod_s_h">,
1416
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1417
def int_mips_mod_s_w : ClangBuiltin<"__builtin_msa_mod_s_w">,
1418
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1419
def int_mips_mod_s_d : ClangBuiltin<"__builtin_msa_mod_s_d">,
1420
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1421
 
1422
def int_mips_mod_u_b : ClangBuiltin<"__builtin_msa_mod_u_b">,
1423
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1424
def int_mips_mod_u_h : ClangBuiltin<"__builtin_msa_mod_u_h">,
1425
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1426
def int_mips_mod_u_w : ClangBuiltin<"__builtin_msa_mod_u_w">,
1427
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1428
def int_mips_mod_u_d : ClangBuiltin<"__builtin_msa_mod_u_d">,
1429
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1430
 
1431
def int_mips_move_v : ClangBuiltin<"__builtin_msa_move_v">,
1432
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
1433
 
1434
def int_mips_msub_q_h : ClangBuiltin<"__builtin_msa_msub_q_h">,
1435
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1436
  [IntrNoMem]>;
1437
def int_mips_msub_q_w : ClangBuiltin<"__builtin_msa_msub_q_w">,
1438
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1439
  [IntrNoMem]>;
1440
 
1441
def int_mips_msubr_q_h : ClangBuiltin<"__builtin_msa_msubr_q_h">,
1442
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1443
  [IntrNoMem]>;
1444
def int_mips_msubr_q_w : ClangBuiltin<"__builtin_msa_msubr_q_w">,
1445
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1446
  [IntrNoMem]>;
1447
 
1448
def int_mips_msubv_b : ClangBuiltin<"__builtin_msa_msubv_b">,
1449
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
1450
  [IntrNoMem]>;
1451
def int_mips_msubv_h : ClangBuiltin<"__builtin_msa_msubv_h">,
1452
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1453
  [IntrNoMem]>;
1454
def int_mips_msubv_w : ClangBuiltin<"__builtin_msa_msubv_w">,
1455
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1456
  [IntrNoMem]>;
1457
def int_mips_msubv_d : ClangBuiltin<"__builtin_msa_msubv_d">,
1458
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
1459
  [IntrNoMem]>;
1460
 
1461
def int_mips_mul_q_h : ClangBuiltin<"__builtin_msa_mul_q_h">,
1462
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1463
def int_mips_mul_q_w : ClangBuiltin<"__builtin_msa_mul_q_w">,
1464
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1465
 
1466
def int_mips_mulr_q_h : ClangBuiltin<"__builtin_msa_mulr_q_h">,
1467
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1468
def int_mips_mulr_q_w : ClangBuiltin<"__builtin_msa_mulr_q_w">,
1469
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1470
 
1471
def int_mips_mulv_b : ClangBuiltin<"__builtin_msa_mulv_b">,
1472
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1473
def int_mips_mulv_h : ClangBuiltin<"__builtin_msa_mulv_h">,
1474
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1475
def int_mips_mulv_w : ClangBuiltin<"__builtin_msa_mulv_w">,
1476
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1477
def int_mips_mulv_d : ClangBuiltin<"__builtin_msa_mulv_d">,
1478
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1479
 
1480
def int_mips_nloc_b : ClangBuiltin<"__builtin_msa_nloc_b">,
1481
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
1482
def int_mips_nloc_h : ClangBuiltin<"__builtin_msa_nloc_h">,
1483
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
1484
def int_mips_nloc_w : ClangBuiltin<"__builtin_msa_nloc_w">,
1485
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
1486
def int_mips_nloc_d : ClangBuiltin<"__builtin_msa_nloc_d">,
1487
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
1488
 
1489
def int_mips_nlzc_b : ClangBuiltin<"__builtin_msa_nlzc_b">,
1490
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
1491
def int_mips_nlzc_h : ClangBuiltin<"__builtin_msa_nlzc_h">,
1492
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
1493
def int_mips_nlzc_w : ClangBuiltin<"__builtin_msa_nlzc_w">,
1494
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
1495
def int_mips_nlzc_d : ClangBuiltin<"__builtin_msa_nlzc_d">,
1496
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
1497
 
1498
def int_mips_nor_v : ClangBuiltin<"__builtin_msa_nor_v">,
1499
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1500
 
1501
def int_mips_nori_b : ClangBuiltin<"__builtin_msa_nori_b">,
1502
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1503
 
1504
def int_mips_or_v : ClangBuiltin<"__builtin_msa_or_v">,
1505
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1506
 
1507
def int_mips_ori_b : ClangBuiltin<"__builtin_msa_ori_b">,
1508
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1509
 
1510
def int_mips_pckev_b : ClangBuiltin<"__builtin_msa_pckev_b">,
1511
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1512
def int_mips_pckev_h : ClangBuiltin<"__builtin_msa_pckev_h">,
1513
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1514
def int_mips_pckev_w : ClangBuiltin<"__builtin_msa_pckev_w">,
1515
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1516
def int_mips_pckev_d : ClangBuiltin<"__builtin_msa_pckev_d">,
1517
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1518
 
1519
def int_mips_pckod_b : ClangBuiltin<"__builtin_msa_pckod_b">,
1520
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1521
def int_mips_pckod_h : ClangBuiltin<"__builtin_msa_pckod_h">,
1522
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1523
def int_mips_pckod_w : ClangBuiltin<"__builtin_msa_pckod_w">,
1524
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1525
def int_mips_pckod_d : ClangBuiltin<"__builtin_msa_pckod_d">,
1526
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1527
 
1528
def int_mips_pcnt_b : ClangBuiltin<"__builtin_msa_pcnt_b">,
1529
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
1530
def int_mips_pcnt_h : ClangBuiltin<"__builtin_msa_pcnt_h">,
1531
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
1532
def int_mips_pcnt_w : ClangBuiltin<"__builtin_msa_pcnt_w">,
1533
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
1534
def int_mips_pcnt_d : ClangBuiltin<"__builtin_msa_pcnt_d">,
1535
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
1536
 
1537
def int_mips_sat_s_b : ClangBuiltin<"__builtin_msa_sat_s_b">,
1538
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1539
def int_mips_sat_s_h : ClangBuiltin<"__builtin_msa_sat_s_h">,
1540
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1541
def int_mips_sat_s_w : ClangBuiltin<"__builtin_msa_sat_s_w">,
1542
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1543
def int_mips_sat_s_d : ClangBuiltin<"__builtin_msa_sat_s_d">,
1544
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1545
 
1546
def int_mips_sat_u_b : ClangBuiltin<"__builtin_msa_sat_u_b">,
1547
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1548
def int_mips_sat_u_h : ClangBuiltin<"__builtin_msa_sat_u_h">,
1549
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1550
def int_mips_sat_u_w : ClangBuiltin<"__builtin_msa_sat_u_w">,
1551
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1552
def int_mips_sat_u_d : ClangBuiltin<"__builtin_msa_sat_u_d">,
1553
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1554
 
1555
def int_mips_shf_b : ClangBuiltin<"__builtin_msa_shf_b">,
1556
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1557
def int_mips_shf_h : ClangBuiltin<"__builtin_msa_shf_h">,
1558
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1559
def int_mips_shf_w : ClangBuiltin<"__builtin_msa_shf_w">,
1560
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1561
 
1562
def int_mips_sld_b : ClangBuiltin<"__builtin_msa_sld_b">,
1563
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
1564
def int_mips_sld_h : ClangBuiltin<"__builtin_msa_sld_h">,
1565
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
1566
def int_mips_sld_w : ClangBuiltin<"__builtin_msa_sld_w">,
1567
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
1568
def int_mips_sld_d : ClangBuiltin<"__builtin_msa_sld_d">,
1569
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
1570
 
1571
def int_mips_sldi_b : ClangBuiltin<"__builtin_msa_sldi_b">,
1572
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
1573
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
1574
def int_mips_sldi_h : ClangBuiltin<"__builtin_msa_sldi_h">,
1575
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty],
1576
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
1577
def int_mips_sldi_w : ClangBuiltin<"__builtin_msa_sldi_w">,
1578
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
1579
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
1580
def int_mips_sldi_d : ClangBuiltin<"__builtin_msa_sldi_d">,
1581
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
1582
            [IntrNoMem, ImmArg<ArgIndex<2>>]>;
1583
 
1584
def int_mips_sll_b : ClangBuiltin<"__builtin_msa_sll_b">,
1585
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1586
def int_mips_sll_h : ClangBuiltin<"__builtin_msa_sll_h">,
1587
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1588
def int_mips_sll_w : ClangBuiltin<"__builtin_msa_sll_w">,
1589
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1590
def int_mips_sll_d : ClangBuiltin<"__builtin_msa_sll_d">,
1591
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1592
 
1593
def int_mips_slli_b : ClangBuiltin<"__builtin_msa_slli_b">,
1594
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1595
def int_mips_slli_h : ClangBuiltin<"__builtin_msa_slli_h">,
1596
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1597
def int_mips_slli_w : ClangBuiltin<"__builtin_msa_slli_w">,
1598
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1599
def int_mips_slli_d : ClangBuiltin<"__builtin_msa_slli_d">,
1600
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1601
 
1602
def int_mips_splat_b : ClangBuiltin<"__builtin_msa_splat_b">,
1603
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
1604
def int_mips_splat_h : ClangBuiltin<"__builtin_msa_splat_h">,
1605
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
1606
def int_mips_splat_w : ClangBuiltin<"__builtin_msa_splat_w">,
1607
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
1608
def int_mips_splat_d : ClangBuiltin<"__builtin_msa_splat_d">,
1609
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
1610
 
1611
def int_mips_splati_b : ClangBuiltin<"__builtin_msa_splati_b">,
1612
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1613
def int_mips_splati_h : ClangBuiltin<"__builtin_msa_splati_h">,
1614
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1615
def int_mips_splati_w : ClangBuiltin<"__builtin_msa_splati_w">,
1616
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1617
def int_mips_splati_d : ClangBuiltin<"__builtin_msa_splati_d">,
1618
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1619
 
1620
def int_mips_sra_b : ClangBuiltin<"__builtin_msa_sra_b">,
1621
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1622
def int_mips_sra_h : ClangBuiltin<"__builtin_msa_sra_h">,
1623
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1624
def int_mips_sra_w : ClangBuiltin<"__builtin_msa_sra_w">,
1625
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1626
def int_mips_sra_d : ClangBuiltin<"__builtin_msa_sra_d">,
1627
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1628
 
1629
def int_mips_srai_b : ClangBuiltin<"__builtin_msa_srai_b">,
1630
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1631
def int_mips_srai_h : ClangBuiltin<"__builtin_msa_srai_h">,
1632
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1633
def int_mips_srai_w : ClangBuiltin<"__builtin_msa_srai_w">,
1634
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1635
def int_mips_srai_d : ClangBuiltin<"__builtin_msa_srai_d">,
1636
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1637
 
1638
def int_mips_srar_b : ClangBuiltin<"__builtin_msa_srar_b">,
1639
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1640
def int_mips_srar_h : ClangBuiltin<"__builtin_msa_srar_h">,
1641
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1642
def int_mips_srar_w : ClangBuiltin<"__builtin_msa_srar_w">,
1643
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1644
def int_mips_srar_d : ClangBuiltin<"__builtin_msa_srar_d">,
1645
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1646
 
1647
def int_mips_srari_b : ClangBuiltin<"__builtin_msa_srari_b">,
1648
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1649
def int_mips_srari_h : ClangBuiltin<"__builtin_msa_srari_h">,
1650
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1651
def int_mips_srari_w : ClangBuiltin<"__builtin_msa_srari_w">,
1652
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1653
def int_mips_srari_d : ClangBuiltin<"__builtin_msa_srari_d">,
1654
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1655
 
1656
def int_mips_srl_b : ClangBuiltin<"__builtin_msa_srl_b">,
1657
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1658
def int_mips_srl_h : ClangBuiltin<"__builtin_msa_srl_h">,
1659
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1660
def int_mips_srl_w : ClangBuiltin<"__builtin_msa_srl_w">,
1661
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1662
def int_mips_srl_d : ClangBuiltin<"__builtin_msa_srl_d">,
1663
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1664
 
1665
def int_mips_srli_b : ClangBuiltin<"__builtin_msa_srli_b">,
1666
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1667
def int_mips_srli_h : ClangBuiltin<"__builtin_msa_srli_h">,
1668
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1669
def int_mips_srli_w : ClangBuiltin<"__builtin_msa_srli_w">,
1670
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1671
def int_mips_srli_d : ClangBuiltin<"__builtin_msa_srli_d">,
1672
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1673
 
1674
def int_mips_srlr_b : ClangBuiltin<"__builtin_msa_srlr_b">,
1675
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1676
def int_mips_srlr_h : ClangBuiltin<"__builtin_msa_srlr_h">,
1677
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1678
def int_mips_srlr_w : ClangBuiltin<"__builtin_msa_srlr_w">,
1679
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1680
def int_mips_srlr_d : ClangBuiltin<"__builtin_msa_srlr_d">,
1681
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1682
 
1683
def int_mips_srlri_b : ClangBuiltin<"__builtin_msa_srlri_b">,
1684
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1685
def int_mips_srlri_h : ClangBuiltin<"__builtin_msa_srlri_h">,
1686
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1687
def int_mips_srlri_w : ClangBuiltin<"__builtin_msa_srlri_w">,
1688
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1689
def int_mips_srlri_d : ClangBuiltin<"__builtin_msa_srlri_d">,
1690
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1691
 
1692
def int_mips_st_b : ClangBuiltin<"__builtin_msa_st_b">,
1693
  Intrinsic<[], [llvm_v16i8_ty, llvm_ptr_ty, llvm_i32_ty],
1694
  [IntrArgMemOnly]>;
1695
def int_mips_st_h : ClangBuiltin<"__builtin_msa_st_h">,
1696
  Intrinsic<[], [llvm_v8i16_ty, llvm_ptr_ty, llvm_i32_ty],
1697
  [IntrArgMemOnly]>;
1698
def int_mips_st_w : ClangBuiltin<"__builtin_msa_st_w">,
1699
  Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty, llvm_i32_ty],
1700
  [IntrArgMemOnly]>;
1701
def int_mips_st_d : ClangBuiltin<"__builtin_msa_st_d">,
1702
  Intrinsic<[], [llvm_v2i64_ty, llvm_ptr_ty, llvm_i32_ty],
1703
  [IntrArgMemOnly]>;
1704
 
1705
def int_mips_str_d : ClangBuiltin<"__builtin_msa_str_d">,
1706
  Intrinsic<[], [llvm_v2i64_ty, llvm_ptr_ty, llvm_i32_ty],
1707
  [IntrArgMemOnly]>;
1708
def int_mips_str_w : ClangBuiltin<"__builtin_msa_str_w">,
1709
  Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty, llvm_i32_ty],
1710
  [IntrArgMemOnly]>;
1711
 
1712
def int_mips_subs_s_b : ClangBuiltin<"__builtin_msa_subs_s_b">,
1713
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1714
def int_mips_subs_s_h : ClangBuiltin<"__builtin_msa_subs_s_h">,
1715
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1716
def int_mips_subs_s_w : ClangBuiltin<"__builtin_msa_subs_s_w">,
1717
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1718
def int_mips_subs_s_d : ClangBuiltin<"__builtin_msa_subs_s_d">,
1719
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1720
 
1721
def int_mips_subs_u_b : ClangBuiltin<"__builtin_msa_subs_u_b">,
1722
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1723
def int_mips_subs_u_h : ClangBuiltin<"__builtin_msa_subs_u_h">,
1724
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1725
def int_mips_subs_u_w : ClangBuiltin<"__builtin_msa_subs_u_w">,
1726
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1727
def int_mips_subs_u_d : ClangBuiltin<"__builtin_msa_subs_u_d">,
1728
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1729
 
1730
def int_mips_subsus_u_b : ClangBuiltin<"__builtin_msa_subsus_u_b">,
1731
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1732
def int_mips_subsus_u_h : ClangBuiltin<"__builtin_msa_subsus_u_h">,
1733
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1734
def int_mips_subsus_u_w : ClangBuiltin<"__builtin_msa_subsus_u_w">,
1735
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1736
def int_mips_subsus_u_d : ClangBuiltin<"__builtin_msa_subsus_u_d">,
1737
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1738
 
1739
def int_mips_subsuu_s_b : ClangBuiltin<"__builtin_msa_subsuu_s_b">,
1740
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1741
def int_mips_subsuu_s_h : ClangBuiltin<"__builtin_msa_subsuu_s_h">,
1742
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1743
def int_mips_subsuu_s_w : ClangBuiltin<"__builtin_msa_subsuu_s_w">,
1744
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1745
def int_mips_subsuu_s_d : ClangBuiltin<"__builtin_msa_subsuu_s_d">,
1746
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1747
 
1748
def int_mips_subv_b : ClangBuiltin<"__builtin_msa_subv_b">,
1749
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1750
def int_mips_subv_h : ClangBuiltin<"__builtin_msa_subv_h">,
1751
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
1752
def int_mips_subv_w : ClangBuiltin<"__builtin_msa_subv_w">,
1753
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
1754
def int_mips_subv_d : ClangBuiltin<"__builtin_msa_subv_d">,
1755
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
1756
 
1757
def int_mips_subvi_b : ClangBuiltin<"__builtin_msa_subvi_b">,
1758
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1759
def int_mips_subvi_h : ClangBuiltin<"__builtin_msa_subvi_h">,
1760
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1761
def int_mips_subvi_w : ClangBuiltin<"__builtin_msa_subvi_w">,
1762
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1763
def int_mips_subvi_d : ClangBuiltin<"__builtin_msa_subvi_d">,
1764
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1765
 
1766
def int_mips_vshf_b : ClangBuiltin<"__builtin_msa_vshf_b">,
1767
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
1768
            [IntrNoMem]>;
1769
def int_mips_vshf_h : ClangBuiltin<"__builtin_msa_vshf_h">,
1770
  Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
1771
            [IntrNoMem]>;
1772
def int_mips_vshf_w : ClangBuiltin<"__builtin_msa_vshf_w">,
1773
  Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
1774
            [IntrNoMem]>;
1775
def int_mips_vshf_d : ClangBuiltin<"__builtin_msa_vshf_d">,
1776
  Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
1777
            [IntrNoMem]>;
1778
 
1779
def int_mips_xor_v : ClangBuiltin<"__builtin_msa_xor_v">,
1780
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
1781
 
1782
def int_mips_xori_b : ClangBuiltin<"__builtin_msa_xori_b">,
1783
  Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
1784
}