Skip to main content

rustc_hir_analysis/check/
intrinsic.rs

1//! Type-checking for the `#[rustc_intrinsic]` intrinsics that the compiler exposes.
2
3use rustc_attr_ir::lang_items::LangItem;
4use rustc_errors::DiagMessage;
5use rustc_hir as hir;
6use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
7use rustc_middle::ty::consts::ConstExt;
8use rustc_middle::ty::{self, Const, Ty, TyCtxt};
9use rustc_span::def_id::LocalDefId;
10use rustc_span::{Span, Symbol, sym};
11
12use crate::check::check_function_signature;
13use crate::diagnostics::{UnrecognizedIntrinsicFunction, WrongNumberOfGenericArgumentsToIntrinsic};
14
15fn equate_intrinsic_type<'tcx>(
16    tcx: TyCtxt<'tcx>,
17    span: Span,
18    def_id: LocalDefId,
19    n_tps: usize,
20    n_lts: usize,
21    n_cts: usize,
22    sig: ty::PolyFnSig<'tcx>,
23) {
24    let (generics, span) = match tcx.hir_node_by_def_id(def_id) {
25        hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn { generics, .. }, .. }) => {
26            (tcx.generics_of(def_id), generics.span)
27        }
28        _ => tcx.dcx().span_bug(span, "intrinsic must be a function"),
29    };
30    let own_counts = generics.own_counts();
31
32    let gen_count_ok = |found: usize, expected: usize, descr: &str| -> bool {
33        if found != expected {
34            tcx.dcx().emit_err(WrongNumberOfGenericArgumentsToIntrinsic {
35                span,
36                found,
37                expected,
38                descr,
39            });
40            false
41        } else {
42            true
43        }
44    };
45
46    // the host effect param should be invisible as it shouldn't matter
47    // whether effects is enabled for the intrinsic provider crate.
48    if gen_count_ok(own_counts.lifetimes, n_lts, "lifetime")
49        && gen_count_ok(own_counts.types, n_tps, "type")
50        && gen_count_ok(own_counts.consts, n_cts, "const")
51    {
52        let _ = check_function_signature(
53            tcx,
54            ObligationCause::new(span, def_id, ObligationCauseCode::IntrinsicType),
55            def_id.into(),
56            sig,
57        );
58    }
59}
60
61/// Returns the unsafety of the given intrinsic.
62fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hir::Safety {
63    let is_in_list = match tcx.item_name(intrinsic_id) {
64        // When adding a new intrinsic to this list,
65        // it's usually worth updating that intrinsic's documentation
66        // to note that it's safe to call, since
67        // safe extern fns are otherwise unprecedented.
68
69        // tidy-alphabetical-start
70        | sym::abort
71        | sym::add_with_overflow
72        | sym::aggregate_raw_ptr
73        | sym::align_of
74        | sym::amdgpu_dispatch_ptr
75        | sym::assert_inhabited
76        | sym::assert_mem_uninitialized_valid
77        | sym::assert_zero_valid
78        | sym::autodiff
79        | sym::bitreverse
80        | sym::black_box
81        | sym::breakpoint
82        | sym::bswap
83        | sym::caller_location
84        | sym::carrying_mul_add
85        | sym::carryless_mul
86        | sym::ceilf16
87        | sym::ceilf32
88        | sym::ceilf64
89        | sym::ceilf128
90        | sym::cold_path
91        | sym::const_eval_select
92        | sym::contract_check_ensures
93        | sym::contract_check_requires
94        | sym::contract_checks
95        | sym::copysignf16
96        | sym::copysignf32
97        | sym::copysignf64
98        | sym::copysignf128
99        | sym::cos
100        | sym::ctlz
101        | sym::ctpop
102        | sym::cttz
103        | sym::discriminant_value
104        | sym::exp
105        | sym::exp2
106        | sym::fabs
107        | sym::fadd_algebraic
108        | sym::fdiv_algebraic
109        | sym::field_offset
110        | sym::field_representing_type_actual_type_id
111        | sym::field_representing_type_name
112        | sym::field_representing_type_offset
113        | sym::floorf16
114        | sym::floorf32
115        | sym::floorf64
116        | sym::floorf128
117        | sym::fmaf16
118        | sym::fmaf32
119        | sym::fmaf64
120        | sym::fmaf128
121        | sym::fmul_algebraic
122        | sym::fmuladdf16
123        | sym::fmuladdf32
124        | sym::fmuladdf64
125        | sym::fmuladdf128
126        | sym::forget
127        | sym::frem_algebraic
128        | sym::fsub_algebraic
129        | sym::gpu_launch_sized_workgroup_mem
130        | sym::integer_max
131        | sym::integer_min
132        | sym::is_val_statically_known
133        | sym::log
134        | sym::log2
135        | sym::log10
136        | sym::maximum_number_nsz_f16
137        | sym::maximum_number_nsz_f32
138        | sym::maximum_number_nsz_f64
139        | sym::maximum_number_nsz_f128
140        | sym::maximumf16
141        | sym::maximumf32
142        | sym::maximumf64
143        | sym::maximumf128
144        | sym::minimum_number_nsz_f16
145        | sym::minimum_number_nsz_f32
146        | sym::minimum_number_nsz_f64
147        | sym::minimum_number_nsz_f128
148        | sym::minimumf16
149        | sym::minimumf32
150        | sym::minimumf64
151        | sym::minimumf128
152        | sym::mul_with_overflow
153        | sym::needs_drop
154        | sym::non_exhaustive
155        | sym::offload
156        | sym::offload_get_num_devices
157        | sym::offset_of
158        | sym::overflow_checks
159        | sym::powf16
160        | sym::powf32
161        | sym::powf64
162        | sym::powf128
163        | sym::powif16
164        | sym::powif32
165        | sym::powif64
166        | sym::powif128
167        | sym::prefetch_read_data
168        | sym::prefetch_read_instruction
169        | sym::prefetch_write_data
170        | sym::prefetch_write_instruction
171        | sym::ptr_guaranteed_cmp
172        | sym::ptr_mask
173        | sym::ptr_metadata
174        | sym::return_address
175        | sym::rotate_left
176        | sym::rotate_right
177        | sym::round_ties_even_f16
178        | sym::round_ties_even_f32
179        | sym::round_ties_even_f64
180        | sym::round_ties_even_f128
181        | sym::roundf16
182        | sym::roundf32
183        | sym::roundf64
184        | sym::roundf128
185        | sym::rustc_peek
186        | sym::saturating_add
187        | sym::saturating_sub
188        | sym::select_unpredictable
189        | sym::sin
190        | sym::size_of
191        | sym::size_of_type_id
192        | sym::sqrtf16
193        | sym::sqrtf32
194        | sym::sqrtf64
195        | sym::sqrtf128
196        | sym::sub_with_overflow
197        | sym::three_way_compare
198        | sym::truncf16
199        | sym::truncf32
200        | sym::truncf64
201        | sym::truncf128
202        | sym::type_id
203        | sym::type_id_array_len
204        | sym::type_id_element_ty
205        | sym::type_id_eq
206        | sym::type_id_field_representing_type
207        | sym::type_id_fields
208        | sym::type_id_function_ptr
209        | sym::type_id_generics
210        | sym::type_id_is_signed
211        | sym::type_id_points_mutably
212        | sym::type_id_points_to
213        | sym::type_id_variants
214        | sym::type_id_vtable
215        | sym::type_name
216        | sym::type_of
217        | sym::ub_checks
218        | sym::va_copy
219        | sym::variant_count
220        | sym::variant_name
221        | sym::variant_non_exhaustive
222        | sym::wrapping_add
223        | sym::wrapping_mul
224        | sym::wrapping_sub
225        | sym::write_box_via_move
226        // tidy-alphabetical-end
227        => hir::Safety::Safe,
228        _ => hir::Safety::Unsafe,
229    };
230
231    if tcx.fn_sig(intrinsic_id).skip_binder().safety() != is_in_list {
232        tcx.dcx().struct_span_err(
233            tcx.def_span(intrinsic_id),
234            DiagMessage::from(::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{0}`",
                tcx.item_name(intrinsic_id)))
    })format!(
235                "intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{}`",
236                tcx.item_name(intrinsic_id)
237            )
238        )).emit();
239    }
240
241    is_in_list
242}
243
244/// Remember to add all intrinsics here, in `compiler/rustc_codegen_llvm/src/intrinsic.rs`,
245/// and in `library/core/src/intrinsics.rs`.
246pub(crate) fn check_intrinsic_type(
247    tcx: TyCtxt<'_>,
248    intrinsic_id: LocalDefId,
249    span: Span,
250    intrinsic_name: Symbol,
251) {
252    let generics = tcx.generics_of(intrinsic_id);
253    let param = |n| {
254        if let &ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. } =
255            generics.param_at(n as usize, tcx)
256        {
257            Ty::new_param(tcx, n, name)
258        } else {
259            Ty::new_error_with_message(tcx, span, "expected param")
260        }
261    };
262
263    let bound_vars = tcx.mk_bound_variable_kinds(&[
264        ty::BoundVariableKind::Region(ty::BoundRegionKind::Anon),
265        ty::BoundVariableKind::Region(ty::BoundRegionKind::Anon),
266        ty::BoundVariableKind::Region(ty::BoundRegionKind::ClosureEnv),
267    ]);
268    let mk_va_list_ty = |mutbl| {
269        let did = tcx.require_lang_item(LangItem::VaList, span);
270        let region = ty::Region::new_bound(
271            tcx,
272            ty::INNERMOST,
273            ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon },
274        );
275        let env_region = ty::Region::new_bound(
276            tcx,
277            ty::INNERMOST,
278            ty::BoundRegion {
279                var: ty::BoundVar::from_u32(2),
280                kind: ty::BoundRegionKind::ClosureEnv,
281            },
282        );
283        let va_list_ty = tcx.type_of(did).instantiate(tcx, &[region.into()]).skip_norm_wip();
284        (Ty::new_ref(tcx, env_region, va_list_ty, mutbl), va_list_ty)
285    };
286    let type_id_ty = || tcx.type_of(tcx.lang_items().type_id().unwrap()).no_bound_vars().unwrap();
287
288    let safety = intrinsic_operation_unsafety(tcx, intrinsic_id);
289    let n_lts = 0;
290    let (n_tps, n_cts, inputs, output) = match intrinsic_name {
291        sym::autodiff => (4, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(3)),
292        sym::abort => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.never),
293        sym::amdgpu_dispatch_ptr => (0, 0, ::alloc::vec::Vec::new()vec![], Ty::new_imm_ptr(tcx, tcx.types.unit)),
294        sym::unreachable => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.never),
295        sym::breakpoint => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit),
296        sym::size_of | sym::align_of | sym::variant_count => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.usize),
297        sym::size_of_val | sym::align_of_val => {
298            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize)
299        }
300        sym::size_of_type_id => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, tcx.types.usize)),
301        sym::offset_of => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.u32, tcx.types.u32]))vec![tcx.types.u32, tcx.types.u32], tcx.types.usize),
302        sym::field_offset => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.usize),
303        sym::rustc_peek => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(0)),
304        sym::caller_location => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.caller_location_ty()),
305        sym::gpu_launch_sized_workgroup_mem => (1, 0, ::alloc::vec::Vec::new()vec![], Ty::new_mut_ptr(tcx, param(0))),
306        sym::assert_inhabited | sym::assert_zero_valid | sym::assert_mem_uninitialized_valid => {
307            (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit)
308        }
309        sym::forget => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], tcx.types.unit),
310        sym::transmute | sym::transmute_unchecked => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
311        sym::prefetch_read_data
312        | sym::prefetch_write_data
313        | sym::prefetch_read_instruction
314        | sym::prefetch_write_instruction => {
315            (1, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.unit)
316        }
317        sym::needs_drop => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.bool),
318
319        sym::type_name => (1, 0, ::alloc::vec::Vec::new()vec![], Ty::new_static_str(tcx)),
320        sym::type_id => (1, 0, ::alloc::vec::Vec::new()vec![], type_id_ty()),
321        sym::type_id_array_len => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
322        sym::type_id_element_ty => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, type_id_ty())),
323        sym::type_id_eq => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty(), type_id_ty()]))vec![type_id_ty(), type_id_ty()], tcx.types.bool),
324        sym::type_id_field_representing_type => {
325            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty(), tcx.types.usize, tcx.types.usize]))vec![type_id_ty(), tcx.types.usize, tcx.types.usize], type_id_ty())
326        }
327        sym::type_id_fields => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], tcx.types.usize),
328        sym::type_id_function_ptr => {
329            let fn_ptr = tcx.require_lang_item(LangItem::FnPtr, span);
330            let fn_ptr_adt_ref = tcx.adt_def(fn_ptr);
331            let fn_ptr_ty = Ty::new_adt(tcx, fn_ptr_adt_ref, ty::List::empty());
332
333            let option = tcx.require_lang_item(LangItem::Option, span);
334            let option_adt_ref = tcx.adt_def(option);
335            let option_args = tcx.mk_args(&[fn_ptr_ty.into()]);
336            let option_fn_ptr_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
337            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], option_fn_ptr_ty)
338        }
339        sym::type_id_is_signed => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
340        sym::type_id_points_mutably => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
341        sym::type_id_points_to => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, type_id_ty())),
342        sym::type_id_variants => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
343        sym::variant_name => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], Ty::new_static_str(tcx)),
344        sym::variant_non_exhaustive => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], tcx.types.bool),
345        sym::type_id_vtable => {
346            let dyn_metadata = tcx.require_lang_item(LangItem::DynMetadata, span);
347            let dyn_metadata_adt_ref = tcx.adt_def(dyn_metadata);
348            let dyn_metadata_args =
349                tcx.mk_args(&[Ty::new_ptr(tcx, tcx.types.unit, ty::Mutability::Not).into()]);
350            let dyn_ty = Ty::new_adt(tcx, dyn_metadata_adt_ref, dyn_metadata_args);
351
352            let option_did = tcx.require_lang_item(LangItem::Option, span);
353            let option_adt_ref = tcx.adt_def(option_did);
354            let option_args = tcx.mk_args(&[dyn_ty.into()]);
355            let ret_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
356
357            (0, 0, ::alloc::vec::from_elem(type_id_ty(), 2)vec![type_id_ty(); 2], ret_ty)
358        }
359        sym::type_of => (
360            0,
361            0,
362            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()],
363            tcx.type_of(tcx.lang_items().type_struct().unwrap()).no_bound_vars().unwrap(),
364        ),
365        sym::field_representing_type_actual_type_id => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], type_id_ty()),
366        sym::field_representing_type_name => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], Ty::new_static_str(tcx)),
367        sym::field_representing_type_offset => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
368        sym::non_exhaustive => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
369        sym::type_id_generics => (
370            0,
371            0,
372            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [type_id_ty()]))vec![type_id_ty()],
373            Ty::new_imm_ref(
374                tcx,
375                tcx.lifetimes.re_static,
376                Ty::new_slice(
377                    tcx,
378                    tcx.type_of(tcx.lang_items().type_generic().unwrap()).no_bound_vars().unwrap(),
379                ),
380            ),
381        ),
382        sym::offload => (
383            3,
384            0,
385            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0),
                Ty::new_array_with_const_len(tcx, tcx.types.u32,
                    Const::from_target_usize(tcx, 3)),
                Ty::new_array_with_const_len(tcx, tcx.types.u32,
                    Const::from_target_usize(tcx, 3)), tcx.types.u32,
                tcx.types.i32, param(1)]))vec![
386                param(0),
387                Ty::new_array_with_const_len(tcx, tcx.types.u32, Const::from_target_usize(tcx, 3)),
388                Ty::new_array_with_const_len(tcx, tcx.types.u32, Const::from_target_usize(tcx, 3)),
389                tcx.types.u32,
390                tcx.types.i32,
391                param(1),
392            ],
393            param(2),
394        ),
395        sym::offload_get_num_devices => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.i32),
396        sym::offset => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1)]))vec![param(0), param(1)], param(0)),
397        sym::arith_offset => (
398            1,
399            0,
400            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), tcx.types.isize]))vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.isize],
401            Ty::new_imm_ptr(tcx, param(0)),
402        ),
403        sym::slice_get_unchecked => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(1), tcx.types.usize]))vec![param(1), tcx.types.usize], param(0)),
404        sym::ptr_mask => (
405            1,
406            0,
407            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize]))vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize],
408            Ty::new_imm_ptr(tcx, param(0)),
409        ),
410
411        sym::copy | sym::copy_nonoverlapping => (
412            1,
413            0,
414            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), Ty::new_mut_ptr(tcx, param(0)),
                tcx.types.usize]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_mut_ptr(tcx, param(0)), tcx.types.usize],
415            tcx.types.unit,
416        ),
417        sym::volatile_copy_memory | sym::volatile_copy_nonoverlapping_memory => (
418            1,
419            0,
420            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0)),
                tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize],
421            tcx.types.unit,
422        ),
423        sym::compare_bytes => {
424            let byte_ptr = Ty::new_imm_ptr(tcx, tcx.types.u8);
425            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [byte_ptr, byte_ptr, tcx.types.usize]))vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32)
426        }
427        sym::write_bytes | sym::volatile_set_memory => (
428            1,
429            0,
430            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), tcx.types.u8, tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, param(0)), tcx.types.u8, tcx.types.usize],
431            tcx.types.unit,
432        ),
433
434        sym::sqrtf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
435        sym::sqrtf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
436        sym::sqrtf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
437        sym::sqrtf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
438
439        sym::powif16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.i32]))vec![tcx.types.f16, tcx.types.i32], tcx.types.f16),
440        sym::powif32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.i32]))vec![tcx.types.f32, tcx.types.i32], tcx.types.f32),
441        sym::powif64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.i32]))vec![tcx.types.f64, tcx.types.i32], tcx.types.f64),
442        sym::powif128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.i32]))vec![tcx.types.f128, tcx.types.i32], tcx.types.f128),
443
444        sym::powf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
445        sym::powf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
446        sym::powf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
447        sym::powf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
448
449        sym::fmaf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16, tcx.types.f16], tcx.types.f16),
450        sym::fmaf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32),
451        sym::fmaf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64),
452        sym::fmaf128 => {
453            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128, tcx.types.f128], tcx.types.f128)
454        }
455
456        sym::fmuladdf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16, tcx.types.f16], tcx.types.f16),
457        sym::fmuladdf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32),
458        sym::fmuladdf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64),
459        sym::fmuladdf128 => {
460            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128, tcx.types.f128], tcx.types.f128)
461        }
462
463        sym::exp
464        | sym::exp2
465        | sym::log
466        | sym::log2
467        | sym::log10
468        | sym::fabs
469        | sym::sin
470        | sym::cos => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(0)),
471
472        sym::minimum_number_nsz_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
473        sym::minimum_number_nsz_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
474        sym::minimum_number_nsz_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
475        sym::minimum_number_nsz_f128 => {
476            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128)
477        }
478
479        sym::minimumf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
480        sym::minimumf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
481        sym::minimumf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
482        sym::minimumf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
483
484        sym::maximum_number_nsz_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
485        sym::maximum_number_nsz_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
486        sym::maximum_number_nsz_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
487        sym::maximum_number_nsz_f128 => {
488            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128)
489        }
490
491        sym::maximumf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
492        sym::maximumf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
493        sym::maximumf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
494        sym::maximumf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
495
496        sym::copysignf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
497        sym::copysignf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
498        sym::copysignf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
499        sym::copysignf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
500
501        sym::floorf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
502        sym::floorf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
503        sym::floorf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
504        sym::floorf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
505
506        sym::ceilf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
507        sym::ceilf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
508        sym::ceilf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
509        sym::ceilf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
510
511        sym::truncf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
512        sym::truncf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
513        sym::truncf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
514        sym::truncf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
515
516        sym::round_ties_even_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
517        sym::round_ties_even_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
518        sym::round_ties_even_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
519        sym::round_ties_even_f128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
520
521        sym::roundf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
522        sym::roundf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
523        sym::roundf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
524        sym::roundf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
525
526        sym::volatile_load | sym::unaligned_volatile_load => {
527            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0))
528        }
529        sym::volatile_store | sym::unaligned_volatile_store => {
530            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
531        }
532
533        sym::ctpop | sym::ctlz | sym::ctlz_nonzero | sym::cttz | sym::cttz_nonzero => {
534            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], tcx.types.u32)
535        }
536
537        sym::bswap | sym::bitreverse => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(0)),
538
539        sym::three_way_compare => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], tcx.ty_ordering_enum(span)),
540
541        sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => {
542            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool]))
543        }
544
545        sym::carrying_mul_add => (2, 0, ::alloc::vec::from_elem(param(0), 4)vec![param(0); 4], Ty::new_tup(tcx, &[param(1), param(0)])),
546
547        sym::ptr_guaranteed_cmp => (
548            1,
549            0,
550            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
551            tcx.types.u8,
552        ),
553
554        sym::const_allocate => {
555            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.usize, tcx.types.usize]))vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8))
556        }
557        sym::const_deallocate => (
558            0,
559            0,
560            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize,
                tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize],
561            tcx.types.unit,
562        ),
563        sym::const_make_global => {
564            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, tcx.types.u8)]))vec![Ty::new_mut_ptr(tcx, tcx.types.u8)], Ty::new_imm_ptr(tcx, tcx.types.u8))
565        }
566
567        sym::ptr_offset_from => (
568            1,
569            0,
570            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
571            tcx.types.isize,
572        ),
573        sym::ptr_offset_from_unsigned => (
574            1,
575            0,
576            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
577            tcx.types.usize,
578        ),
579        sym::integer_max | sym::integer_min => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0)),
580        sym::unchecked_div | sym::unchecked_rem | sym::exact_div | sym::disjoint_bitor => {
581            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0))
582        }
583        sym::unchecked_shl | sym::unchecked_shr => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1)]))vec![param(0), param(1)], param(0)),
584        sym::rotate_left | sym::rotate_right => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), tcx.types.u32]))vec![param(0), tcx.types.u32], param(0)),
585        sym::unchecked_funnel_shl | sym::unchecked_funnel_shr => {
586            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0), tcx.types.u32]))vec![param(0), param(0), tcx.types.u32], param(0))
587        }
588        sym::unchecked_add | sym::unchecked_sub | sym::unchecked_mul => {
589            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0))
590        }
591        sym::wrapping_add | sym::wrapping_sub | sym::wrapping_mul => {
592            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0))
593        }
594        sym::saturating_add | sym::saturating_sub => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0)),
595        sym::carryless_mul => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0)),
596        sym::fadd_fast | sym::fsub_fast | sym::fmul_fast | sym::fdiv_fast | sym::frem_fast => {
597            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0))
598        }
599        sym::fadd_algebraic
600        | sym::fsub_algebraic
601        | sym::fmul_algebraic
602        | sym::fdiv_algebraic
603        | sym::frem_algebraic => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0)),
604        sym::float_to_int_unchecked => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
605
606        sym::assume => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.bool]))vec![tcx.types.bool], tcx.types.unit),
607        sym::select_unpredictable => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [tcx.types.bool, param(0), param(0)]))vec![tcx.types.bool, param(0), param(0)], param(0)),
608        sym::cold_path => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit),
609
610        sym::read_via_copy => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0)),
611        sym::write_via_move => {
612            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
613        }
614        sym::write_box_via_move => {
615            let t = param(0);
616            let maybe_uninit_t = Ty::new_maybe_uninit(tcx, t);
617            let box_mu_t = Ty::new_box(tcx, maybe_uninit_t);
618
619            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [box_mu_t, param(0)]))vec![box_mu_t, param(0)], box_mu_t)
620        }
621
622        sym::typed_swap_nonoverlapping => {
623            (1, 0, ::alloc::vec::from_elem(Ty::new_mut_ptr(tcx, param(0)), 2)vec![Ty::new_mut_ptr(tcx, param(0)); 2], tcx.types.unit)
624        }
625
626        sym::discriminant_value => {
627            let assoc_items = tcx
628                .associated_item_def_ids(tcx.require_lang_item(LangItem::DiscriminantKind, span));
629            let discriminant_def_id = assoc_items[0];
630
631            let br = ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon };
632            (
633                1,
634                0,
635                ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br),
                    param(0))]))vec![Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0))],
636                Ty::new_projection_from_args(
637                    tcx,
638                    ty::IsRigid::No,
639                    discriminant_def_id,
640                    tcx.mk_args(&[param(0).into()]),
641                ),
642            )
643        }
644
645        sym::catch_unwind => {
646            let mut_data = Ty::new_mut_ptr(tcx, param(0));
647            let mut_u8 = Ty::new_mut_ptr(tcx, tcx.types.u8);
648            let try_fn_ty =
649                ty::Binder::dummy(tcx.mk_fn_sig_unsafe_rust_abi([mut_data], tcx.types.unit));
650            let catch_fn_ty = ty::Binder::dummy(
651                tcx.mk_fn_sig_unsafe_rust_abi([mut_data, mut_u8], tcx.types.unit),
652            );
653            (
654                1,
655                0,
656                ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_fn_ptr(tcx, try_fn_ty), mut_data,
                Ty::new_fn_ptr(tcx, catch_fn_ty)]))vec![Ty::new_fn_ptr(tcx, try_fn_ty), mut_data, Ty::new_fn_ptr(tcx, catch_fn_ty)],
657                tcx.types.bool,
658            )
659        }
660
661        sym::va_copy => {
662            let (va_list_ref_ty, va_list_ty) = mk_va_list_ty(hir::Mutability::Not);
663            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [va_list_ref_ty]))vec![va_list_ref_ty], va_list_ty)
664        }
665
666        sym::va_end => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [mk_va_list_ty(hir::Mutability::Mut).0]))vec![mk_va_list_ty(hir::Mutability::Mut).0], tcx.types.unit),
667
668        sym::va_arg => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [mk_va_list_ty(hir::Mutability::Mut).0]))vec![mk_va_list_ty(hir::Mutability::Mut).0], param(0)),
669
670        sym::nontemporal_store => {
671            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
672        }
673
674        sym::raw_eq => {
675            let br = ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon };
676            let param_ty_lhs =
677                Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0));
678            let br =
679                ty::BoundRegion { var: ty::BoundVar::from_u32(1), kind: ty::BoundRegionKind::Anon };
680            let param_ty_rhs =
681                Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0));
682            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param_ty_lhs, param_ty_rhs]))vec![param_ty_lhs, param_ty_rhs], tcx.types.bool)
683        }
684
685        sym::black_box => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(0)),
686
687        sym::is_val_statically_known => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], tcx.types.bool),
688
689        sym::const_eval_select => (4, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(3)),
690
691        sym::vtable_size | sym::vtable_align => {
692            (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, tcx.types.unit)]))vec![Ty::new_imm_ptr(tcx, tcx.types.unit)], tcx.types.usize)
693        }
694
695        // This type check is not particularly useful, but the `where` bounds
696        // on the definition in `core` do the heavy lifting for checking it.
697        sym::aggregate_raw_ptr => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(1), param(2)]))vec![param(1), param(2)], param(0)),
698        sym::ptr_metadata => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(1)),
699
700        sym::ub_checks | sym::overflow_checks => (0, 0, Vec::new(), tcx.types.bool),
701
702        // contract_check_requires::<C>(C) -> bool, where C: impl Fn() -> bool
703        sym::contract_check_requires => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], tcx.types.unit),
704        sym::contract_check_ensures => {
705            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_option(tcx, param(0)), param(1)]))vec![Ty::new_option(tcx, param(0)), param(1)], param(1))
706        }
707
708        sym::simd_eq | sym::simd_ne | sym::simd_lt | sym::simd_le | sym::simd_gt | sym::simd_ge => {
709            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(1))
710        }
711        sym::simd_add
712        | sym::simd_sub
713        | sym::simd_mul
714        | sym::simd_rem
715        | sym::simd_div
716        | sym::simd_shl
717        | sym::simd_shr
718        | sym::simd_and
719        | sym::simd_or
720        | sym::simd_xor
721        | sym::simd_minimum_number_nsz
722        | sym::simd_maximum_number_nsz
723        | sym::simd_saturating_add
724        | sym::simd_saturating_sub
725        | sym::simd_carryless_mul => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(0)),
726        sym::simd_arith_offset => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1)]))vec![param(0), param(1)], param(0)),
727        sym::simd_neg
728        | sym::simd_bswap
729        | sym::simd_bitreverse
730        | sym::simd_ctlz
731        | sym::simd_cttz
732        | sym::simd_ctpop
733        | sym::simd_fsqrt
734        | sym::simd_fsin
735        | sym::simd_fcos
736        | sym::simd_fexp
737        | sym::simd_fexp2
738        | sym::simd_flog2
739        | sym::simd_flog10
740        | sym::simd_flog
741        | sym::simd_fabs
742        | sym::simd_ceil
743        | sym::simd_floor
744        | sym::simd_round
745        | sym::simd_round_ties_even
746        | sym::simd_trunc => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(0)),
747        sym::simd_fma | sym::simd_relaxed_fma | sym::simd_funnel_shl | sym::simd_funnel_shr => {
748            (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0), param(0)]))vec![param(0), param(0), param(0)], param(0))
749        }
750        sym::simd_gather => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(0)),
751        sym::simd_masked_load => (3, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(2)),
752        sym::simd_masked_store => (3, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], tcx.types.unit),
753        sym::simd_scatter => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], tcx.types.unit),
754        sym::simd_insert | sym::simd_insert_dyn => {
755            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), tcx.types.u32, param(1)]))vec![param(0), tcx.types.u32, param(1)], param(0))
756        }
757        sym::simd_extract | sym::simd_extract_dyn => {
758            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), tcx.types.u32]))vec![param(0), tcx.types.u32], param(1))
759        }
760        sym::simd_splat => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(1)]))vec![param(1)], param(0)),
761        sym::simd_cast
762        | sym::simd_as
763        | sym::simd_cast_ptr
764        | sym::simd_expose_provenance
765        | sym::simd_with_exposed_provenance => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
766        sym::simd_bitmask => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
767        sym::simd_select | sym::simd_select_bitmask => {
768            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1), param(1)]))vec![param(0), param(1), param(1)], param(1))
769        }
770        sym::simd_reduce_all | sym::simd_reduce_any => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], tcx.types.bool),
771        sym::simd_reduce_add_ordered | sym::simd_reduce_mul_ordered => {
772            (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1)]))vec![param(0), param(1)], param(1))
773        }
774        sym::simd_reduce_add_unordered
775        | sym::simd_reduce_mul_unordered
776        | sym::simd_reduce_and
777        | sym::simd_reduce_or
778        | sym::simd_reduce_xor
779        | sym::simd_reduce_min
780        | sym::simd_reduce_max => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
781        sym::simd_shuffle => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0), param(1)]))vec![param(0), param(0), param(1)], param(2)),
782        sym::simd_shuffle_const_generic => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(1)),
783
784        sym::sve_cast => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
785        sym::sve_tuple_create2 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0)]))vec![param(0), param(0)], param(1)),
786        sym::sve_tuple_create3 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0), param(0)]))vec![param(0), param(0), param(0)], param(1)),
787        sym::sve_tuple_create4 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(0), param(0), param(0)]))vec![param(0), param(0), param(0), param(0)], param(1)),
788        sym::sve_tuple_get => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0)]))vec![param(0)], param(1)),
789        sym::sve_tuple_set => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [param(0), param(1)]))vec![param(0), param(1)], param(0)),
790
791        sym::atomic_cxchg | sym::atomic_cxchgweak => (
792            1,
793            2,
794            ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0), param(0)],
795            Ty::new_tup(tcx, &[param(0), tcx.types.bool]),
796        ),
797        sym::atomic_load => (1, 2, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0)),
798        sym::atomic_store => (1, 2, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit),
799
800        sym::atomic_xchg
801        | sym::atomic_max
802        | sym::atomic_min
803        | sym::atomic_umax
804        | sym::atomic_umin => (1, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], param(0)),
805        sym::atomic_xadd
806        | sym::atomic_xsub
807        | sym::atomic_and
808        | sym::atomic_nand
809        | sym::atomic_or
810        | sym::atomic_xor => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [Ty::new_mut_ptr(tcx, param(0)), param(1)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(1)], param(0)),
811        sym::atomic_fence | sym::atomic_singlethreadfence => (0, 1, Vec::new(), tcx.types.unit),
812
813        sym::return_address => (0, 0, ::alloc::vec::Vec::new()vec![], Ty::new_imm_ptr(tcx, tcx.types.unit)),
814
815        other => {
816            tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other });
817            return;
818        }
819    };
820    let sig = tcx.mk_fn_sig_rust_abi(inputs, output, safety);
821    let sig = ty::Binder::bind_with_vars(sig, bound_vars);
822    equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, n_cts, sig)
823}