Open
Description
Description
When compiling in Full Swift mode, UnsafeMutablePointer
’s update(from:count:)
emits a call to memmove()
. But in Embedded mode, a less performant explicit loop is emitted.
Reproduction
func f(dst: UnsafeMutablePointer<Int>, src: UnsafePointer<Int>) {
dst.update(from: src, count: 123)
}
Godbolt: https://godbolt.org/z/s71Mxfoz5
Expected behavior
A call to memmove()
is emitted.
Environment
Swift Development Snapshot 2024-08-03
Additional information
No response