Codegen fewer instructions in mem::replace
This commit is contained in:
parent
ca3f742ff6
commit
5292d48b85
13 changed files with 154 additions and 78 deletions
|
@ -381,6 +381,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
|
|||
sym::unlikely => (0, vec![tcx.types.bool], tcx.types.bool),
|
||||
|
||||
sym::read_via_copy => (1, vec![tcx.mk_imm_ptr(param(0))], param(0)),
|
||||
sym::write_via_move => (1, vec![tcx.mk_mut_ptr(param(0)), param(0)], tcx.mk_unit()),
|
||||
|
||||
sym::discriminant_value => {
|
||||
let assoc_items = tcx.associated_item_def_ids(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue