1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // DO NOT EDIT: autogenerated by etc/platform-intrinsics/generator.py
12 // ignore-tidy-linelength
14 #![allow(unused_imports)]
16 use {Intrinsic, Type};
17 use IntrinsicDef::Named;
19 // The default inlining settings trigger a pathological behaviour in
20 // LLVM, which causes makes compilation very slow. See #28273.
22 pub fn find(name: &str) -> Option<Intrinsic> {
23 if !name.starts_with("powerpc") { return None }
24 Some(match &name["powerpc".len()..] {
25 "_vec_perm" => Intrinsic {
26 inputs: { static INPUTS: [&'static Type; 3] = [&::I32x4, &::I32x4, &::I8x16]; &INPUTS },
28 definition: Named("llvm.ppc.altivec.vperm")
30 "_vec_mradds" => Intrinsic {
31 inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I16x8]; &INPUTS },
33 definition: Named("llvm.ppc.altivec.vmhraddshs")
35 "_vec_cmpb" => Intrinsic {
36 inputs: { static INPUTS: [&'static Type; 2] = [&::F32x4, &::F32x4]; &INPUTS },
38 definition: Named("llvm.ppc.altivec.vcmpbfp")
40 "_vec_cmpeqb" => Intrinsic {
41 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
43 definition: Named("llvm.ppc.altivec.vcmpequb")
45 "_vec_cmpeqh" => Intrinsic {
46 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
48 definition: Named("llvm.ppc.altivec.vcmpequh")
50 "_vec_cmpeqw" => Intrinsic {
51 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
53 definition: Named("llvm.ppc.altivec.vcmpequw")
55 "_vec_cmpgtub" => Intrinsic {
56 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
58 definition: Named("llvm.ppc.altivec.vcmpgtub")
60 "_vec_cmpgtuh" => Intrinsic {
61 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
63 definition: Named("llvm.ppc.altivec.vcmpgtuh")
65 "_vec_cmpgtuw" => Intrinsic {
66 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
68 definition: Named("llvm.ppc.altivec.vcmpgtuw")
70 "_vec_cmpgtsb" => Intrinsic {
71 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
73 definition: Named("llvm.ppc.altivec.vcmpgtsb")
75 "_vec_cmpgtsh" => Intrinsic {
76 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
78 definition: Named("llvm.ppc.altivec.vcmpgtsh")
80 "_vec_cmpgtsw" => Intrinsic {
81 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
83 definition: Named("llvm.ppc.altivec.vcmpgtsw")
85 "_vec_maxsb" => Intrinsic {
86 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
88 definition: Named("llvm.ppc.altivec.vmaxsb")
90 "_vec_maxub" => Intrinsic {
91 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
93 definition: Named("llvm.ppc.altivec.vmaxub")
95 "_vec_maxsh" => Intrinsic {
96 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
98 definition: Named("llvm.ppc.altivec.vmaxsh")
100 "_vec_maxuh" => Intrinsic {
101 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
103 definition: Named("llvm.ppc.altivec.vmaxuh")
105 "_vec_maxsw" => Intrinsic {
106 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
108 definition: Named("llvm.ppc.altivec.vmaxsw")
110 "_vec_maxuw" => Intrinsic {
111 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
113 definition: Named("llvm.ppc.altivec.vmaxuw")
115 "_vec_minsb" => Intrinsic {
116 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
118 definition: Named("llvm.ppc.altivec.vminsb")
120 "_vec_minub" => Intrinsic {
121 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
123 definition: Named("llvm.ppc.altivec.vminub")
125 "_vec_minsh" => Intrinsic {
126 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
128 definition: Named("llvm.ppc.altivec.vminsh")
130 "_vec_minuh" => Intrinsic {
131 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
133 definition: Named("llvm.ppc.altivec.vminuh")
135 "_vec_minsw" => Intrinsic {
136 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
138 definition: Named("llvm.ppc.altivec.vminsw")
140 "_vec_minuw" => Intrinsic {
141 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
143 definition: Named("llvm.ppc.altivec.vminuw")
145 "_vec_subsbs" => Intrinsic {
146 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
148 definition: Named("llvm.ppc.altivec.vsubsbs")
150 "_vec_sububs" => Intrinsic {
151 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
153 definition: Named("llvm.ppc.altivec.vsububs")
155 "_vec_subshs" => Intrinsic {
156 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
158 definition: Named("llvm.ppc.altivec.vsubshs")
160 "_vec_subuhs" => Intrinsic {
161 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
163 definition: Named("llvm.ppc.altivec.vsubuhs")
165 "_vec_subsws" => Intrinsic {
166 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
168 definition: Named("llvm.ppc.altivec.vsubsws")
170 "_vec_subuws" => Intrinsic {
171 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
173 definition: Named("llvm.ppc.altivec.vsubuws")
175 "_vec_subc" => Intrinsic {
176 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
178 definition: Named("llvm.ppc.altivec.vsubcuw")
180 "_vec_addsbs" => Intrinsic {
181 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
183 definition: Named("llvm.ppc.altivec.vaddsbs")
185 "_vec_addubs" => Intrinsic {
186 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
188 definition: Named("llvm.ppc.altivec.vaddubs")
190 "_vec_addshs" => Intrinsic {
191 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
193 definition: Named("llvm.ppc.altivec.vaddshs")
195 "_vec_adduhs" => Intrinsic {
196 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
198 definition: Named("llvm.ppc.altivec.vadduhs")
200 "_vec_addsws" => Intrinsic {
201 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
203 definition: Named("llvm.ppc.altivec.vaddsws")
205 "_vec_adduws" => Intrinsic {
206 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
208 definition: Named("llvm.ppc.altivec.vadduws")
210 "_vec_addc" => Intrinsic {
211 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
213 definition: Named("llvm.ppc.altivec.vaddcuw")
215 "_vec_mulesb" => Intrinsic {
216 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
218 definition: Named("llvm.ppc.altivec.vmulesb")
220 "_vec_muleub" => Intrinsic {
221 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
223 definition: Named("llvm.ppc.altivec.vmuleub")
225 "_vec_mulesh" => Intrinsic {
226 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
228 definition: Named("llvm.ppc.altivec.vmulesh")
230 "_vec_muleuh" => Intrinsic {
231 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
233 definition: Named("llvm.ppc.altivec.vmuleuh")
235 "_vec_mulosb" => Intrinsic {
236 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
238 definition: Named("llvm.ppc.altivec.vmulosb")
240 "_vec_muloub" => Intrinsic {
241 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
243 definition: Named("llvm.ppc.altivec.vmuloub")
245 "_vec_mulosh" => Intrinsic {
246 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
248 definition: Named("llvm.ppc.altivec.vmulosh")
250 "_vec_mulouh" => Intrinsic {
251 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
253 definition: Named("llvm.ppc.altivec.vmulouh")
255 "_vec_avgsb" => Intrinsic {
256 inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I8x16]; &INPUTS },
258 definition: Named("llvm.ppc.altivec.vavgsb")
260 "_vec_avgub" => Intrinsic {
261 inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U8x16]; &INPUTS },
263 definition: Named("llvm.ppc.altivec.vavgub")
265 "_vec_avgsh" => Intrinsic {
266 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
268 definition: Named("llvm.ppc.altivec.vavgsh")
270 "_vec_avguh" => Intrinsic {
271 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
273 definition: Named("llvm.ppc.altivec.vavguh")
275 "_vec_avgsw" => Intrinsic {
276 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
278 definition: Named("llvm.ppc.altivec.vavgsw")
280 "_vec_avguw" => Intrinsic {
281 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
283 definition: Named("llvm.ppc.altivec.vavguw")
285 "_vec_packssh" => Intrinsic {
286 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
288 definition: Named("llvm.ppc.altivec.vpkshss")
290 "_vec_packsuh" => Intrinsic {
291 inputs: { static INPUTS: [&'static Type; 2] = [&::U16x8, &::U16x8]; &INPUTS },
293 definition: Named("llvm.ppc.altivec.vpkuhus")
295 "_vec_packssw" => Intrinsic {
296 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
298 definition: Named("llvm.ppc.altivec.vpkswss")
300 "_vec_packsuw" => Intrinsic {
301 inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
303 definition: Named("llvm.ppc.altivec.vpkuwus")
305 "_vec_packsush" => Intrinsic {
306 inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I16x8]; &INPUTS },
308 definition: Named("llvm.ppc.altivec.vpkshus")
310 "_vec_packsusw" => Intrinsic {
311 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
313 definition: Named("llvm.ppc.altivec.vpkswus")
315 "_vec_packpx" => Intrinsic {
316 inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
318 definition: Named("llvm.ppc.altivec.vpkpx")
320 "_vec_unpacklsb" => Intrinsic {
321 inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS },
323 definition: Named("llvm.ppc.altivec.vupklsb")
325 "_vec_unpacklsh" => Intrinsic {
326 inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS },
328 definition: Named("llvm.ppc.altivec.vupklsh")
330 "_vec_unpackhsb" => Intrinsic {
331 inputs: { static INPUTS: [&'static Type; 1] = [&::I8x16]; &INPUTS },
333 definition: Named("llvm.ppc.altivec.vupkhsb")
335 "_vec_unpackhsh" => Intrinsic {
336 inputs: { static INPUTS: [&'static Type; 1] = [&::I16x8]; &INPUTS },
338 definition: Named("llvm.ppc.altivec.vupkhsh")