Skip to content

Commit 1ed6b05

Browse files
committed
Remove copy_nonoverlapping intrinsic definition
It has been getting lowered to a dedicated MIR statement for a while
1 parent 906b00e commit 1ed6b05

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/intrinsics/mod.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
388388

389389
fx.bcx.ins().debugtrap();
390390
}
391-
sym::copy | sym::copy_nonoverlapping => {
391+
sym::copy => {
392392
intrinsic_args!(fx, args => (src, dst, count); intrinsic);
393393
let src = src.load_scalar(fx);
394394
let dst = dst.load_scalar(fx);
@@ -400,13 +400,8 @@ fn codegen_regular_intrinsic_call<'tcx>(
400400
let byte_amount =
401401
if elem_size != 1 { fx.bcx.ins().imul_imm(count, elem_size as i64) } else { count };
402402

403-
if intrinsic == sym::copy_nonoverlapping {
404-
// FIXME emit_small_memcpy
405-
fx.bcx.call_memcpy(fx.target_config, dst, src, byte_amount);
406-
} else {
407-
// FIXME emit_small_memmove
408-
fx.bcx.call_memmove(fx.target_config, dst, src, byte_amount);
409-
}
403+
// FIXME emit_small_memmove
404+
fx.bcx.call_memmove(fx.target_config, dst, src, byte_amount);
410405
}
411406
sym::volatile_copy_memory | sym::volatile_copy_nonoverlapping_memory => {
412407
// NOTE: the volatile variants have src and dst swapped

0 commit comments

Comments
 (0)