https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122449
Bug ID: 122449
Summary: mem*, __atomic_* functions alignment should be handled
before expand
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: internal-improvement, missed-optimization
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Load/stores have alignment stored in the type that is being used for the
load/store but the __atomic_*, mem* functions (memcpy, memcmp, memmove, memset)
all get their alignment from the ssa name argument.
When doing copy prop after __builtin_assume_aligned was folded, they no longer
get the alignment information from the __builtin_assume_aligned.
There needs to be a way to specify the alignment of the arguments to these
functions outside of the current ssa name alignment.
Having new internal functions might work. But with memcmp, there is also
memcmp_eq too. (but maybe that should be converted into an internal function).
The design here is not completed and will need to be completed.