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