Closed
Description
Godbolt Link
As you can see in the asm output, even set opt-level = 3
, if we don't add Copy
to structs with all fields Copy
derived, in clone()
it generates more mov
and large struct can't trigger memcpy
.
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: An issue highlighting optimization opportunities or PRs implementing suchIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to performance of generated code.Relevant to the compiler team, which will review and decide on the PR/issue.