[Bug middle-end/41455] memcpy not tail called if it's a struct assignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41455 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- Created attachment 42803 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42803=edit gcc8-pr41445.patch Untested fix.
[Bug middle-end/41455] memcpy not tail called if it's a struct assignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41455 --- Comment #5 from Richard Biener --- We could do that I suppose. Of course memcpy will expand to alias-set zero block copies while aggregate assignment can use better info. So in the end this means doing full block-copy expansion on GIMPLE rather than on RTL. Which sounds messy / impossible given stuff like rep; movb; Another option is to not use __builtin_memcpy for aggregate assignments but some internal function call that we can hand extra parameters (for aliasing).
[Bug middle-end/41455] memcpy not tail called if it's a struct assignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41455 --- Comment #4 from Andrew Pinski --- I suspect what we can do is "lower" assignments to memcpy in a pass right before tail call to optimize this case.