-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Useless copies of alignment padding #56297
Copy link
Copy link
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.
See the following extreme test-case:
This is what godbolt says rust stable does with it with -O:
That is, it allocates 1024 bytes (expected), writes
42directly at the allocated location, and then proceeds to copy 1016 (uninitialized) bytes from the stack.