mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
Add const_eval_select intrinsic
This commit is contained in:
parent
2228c49544
commit
0134088cd2
@ -309,13 +309,13 @@ pub(crate) fn codegen_terminator_call<'tcx>(
|
||||
span: Span,
|
||||
func: &Operand<'tcx>,
|
||||
args: &[Operand<'tcx>],
|
||||
destination: Option<(Place<'tcx>, BasicBlock)>,
|
||||
mir_dest: Option<(Place<'tcx>, BasicBlock)>,
|
||||
) {
|
||||
let fn_ty = fx.monomorphize(func.ty(fx.mir, fx.tcx));
|
||||
let fn_sig =
|
||||
fx.tcx.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), fn_ty.fn_sig(fx.tcx));
|
||||
|
||||
let destination = destination.map(|(place, bb)| (codegen_place(fx, place), bb));
|
||||
let destination = mir_dest.map(|(place, bb)| (codegen_place(fx, place), bb));
|
||||
|
||||
// Handle special calls like instrinsics and empty drop glue.
|
||||
let instance = if let ty::FnDef(def_id, substs) = *fn_ty.kind() {
|
||||
|
@ -407,11 +407,9 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
|
||||
destination: Option<(CPlace<'tcx>, BasicBlock)>,
|
||||
span: Span,
|
||||
) {
|
||||
let def_id = instance.def_id();
|
||||
let intrinsic = fx.tcx.item_name(instance.def_id());
|
||||
let substs = instance.substs;
|
||||
|
||||
let intrinsic = fx.tcx.item_name(def_id);
|
||||
|
||||
let ret = match destination {
|
||||
Some((place, _)) => place,
|
||||
None => {
|
||||
|
Loading…
Reference in New Issue
Block a user