diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-08-16 10:39:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 10:39:44 +0000 |
commit | 4665766d3cc9854d1609b71f673e96e0a340805c (patch) | |
tree | f790a4bc549fcaee5e73a566f1507a5eae7b525b /gcc/rust/backend/rust-compile-resolve-path.cc | |
parent | 021e4953390da748515debfc8973149457d3118a (diff) | |
parent | f68ecc7e5914ef99b22c258e404c73b2401f9d89 (diff) | |
download | gcc-4665766d3cc9854d1609b71f673e96e0a340805c.zip gcc-4665766d3cc9854d1609b71f673e96e0a340805c.tar.gz gcc-4665766d3cc9854d1609b71f673e96e0a340805c.tar.bz2 |
Merge #1459
1459: intrinsics: Add copy_nonoverlapping<T> r=CohenArthur a=CohenArthur
intrinsics: Add copy_nonoverlapping<T>
This intrinsic is similar to C's memcpy (or in our case, GCC's
__builtin_memcpy) with the order of arguments swapped and knowledge
about the type of the operands. So we can desugar the following calls:
`copy_nonoverlapping::<T>(src, dst, count)`
can be converted to
`__builtin_memcpy(dst, src, count * size_of::<T>())`
~~Sadly, calling this intrinsic results in calls being optimized out for some reason. I'll open a separate issue to deal with that as I don't have the skills to resolve it.~~ fixed by not marking the function's declaration as `TREE_READONLY`
Fixes #1450
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions