Skip to content

Commit 0134088

Browse files
committed
Add const_eval_select intrinsic
1 parent 2228c49 commit 0134088

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/abi/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,13 @@ pub(crate) fn codegen_terminator_call<'tcx>(
309309
span: Span,
310310
func: &Operand<'tcx>,
311311
args: &[Operand<'tcx>],
312-
destination: Option<(Place<'tcx>, BasicBlock)>,
312+
mir_dest: Option<(Place<'tcx>, BasicBlock)>,
313313
) {
314314
let fn_ty = fx.monomorphize(func.ty(fx.mir, fx.tcx));
315315
let fn_sig =
316316
fx.tcx.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), fn_ty.fn_sig(fx.tcx));
317317

318-
let destination = destination.map(|(place, bb)| (codegen_place(fx, place), bb));
318+
let destination = mir_dest.map(|(place, bb)| (codegen_place(fx, place), bb));
319319

320320
// Handle special calls like instrinsics and empty drop glue.
321321
let instance = if let ty::FnDef(def_id, substs) = *fn_ty.kind() {

src/intrinsics/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,9 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
407407
destination: Option<(CPlace<'tcx>, BasicBlock)>,
408408
span: Span,
409409
) {
410-
let def_id = instance.def_id();
410+
let intrinsic = fx.tcx.item_name(instance.def_id());
411411
let substs = instance.substs;
412412

413-
let intrinsic = fx.tcx.item_name(def_id);
414-
415413
let ret = match destination {
416414
Some((place, _)) => place,
417415
None => {

0 commit comments

Comments
 (0)