]> git.lizzy.rs Git - rust.git/commit
Specialize array cloning for Copy types
authorScott McMurray <scottmcm@users.noreply.github.com>
Wed, 10 Nov 2021 05:43:20 +0000 (21:43 -0800)
committerScott McMurray <scottmcm@users.noreply.github.com>
Wed, 10 Nov 2021 05:43:20 +0000 (21:43 -0800)
commitcc7d8014d720ac800f868a0b7ec854f4a5036e3f
tree8b08bdfe9c86dd3520b882d2616d9da9db3d4f65
parent8b09ba6a5d5c644fe0f1c27c7f9c80b334241707
Specialize array cloning for Copy types

Because after PR 86041, the optimizer no longer load-merges at the LLVM IR level, which might be part of the perf loss.  (I'll run perf and see if this makes a difference.)

Also I added a codegen test so this hopefully won't regress in future -- it passes on stable and with my change here, but not on the 2021-11-09 nightly.
library/core/src/array/mod.rs
src/test/codegen/array-clone.rs [new file with mode: 0644]