Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Structure Field Assignments via __builtin_memcpy on Stack Vars #4301

Closed
w1282 opened this issue May 10, 2023 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue is a non-crashing bug with repro steps
Milestone

Comments

@w1282
Copy link

w1282 commented May 10, 2023

What is the feature you'd like to have?
When the destination of a call to __builtin_memcpy is a stack variable that has been typed with a structure, it would be nice for the __builtin_memcpy to be exploded into a series of structure field assignments, in a similar fashion to how non-stack variable static assignments are handled.

Is your feature request related to a problem?
There is a loss of clarity when a stack-local structure is initialized with default values and those get optimized into a single static assignment which gets translated into a __builtin_memcpy call. See below screenshot for example.

Are any alternative solutions acceptable?
None that I have considered.

Additional Information:
Please add any other context or screenshots that would help us understand your feature request here.
sample

@w1282 w1282 changed the title Structure Field Assignments via __builtin_memcpy Missing Structure Field Assignments via __builtin_memcpy on Stack Vars May 10, 2023
@bpotchik bpotchik self-assigned this May 23, 2023
@bpotchik bpotchik added the Type: Bug Issue is a non-crashing bug with repro steps label May 23, 2023
@bpotchik bpotchik added this to the Coruscant milestone May 23, 2023
@bpotchik
Copy link
Member

Fixed in 3.5.4292-dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue is a non-crashing bug with repro steps
Projects
None yet
Development

No branches or pull requests

2 participants