https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97891
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |tree-optimization
Severity|normal |enhancement
Summary|[x86] Consider using |Consider using registers on
|registers on large |large initializations with
|initializations |padding
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is a padding which causes some of the issue.
If I change the constructor to be constexpr, C++ front-end produces:
(void) (*(p + (sizetype) ((long unsigned int) i * 48)) = *(struct A &)
&TARGET_EXPR <D.4646, {.a=0, .b=0, .c=0, .d=0, .x=0, .y=0, .z=0, .p=0B}>)
>>>>>;
But then the gimplifier messes up and does a store for each field for x86_64.
insted of just `= {}` (which it does for aarch64).