[Bug c++/82888] terrible code generation for initialization of POD array members vs. clang

froydnj at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 7 18:45:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82888

--- Comment #3 from Nathan Froyd <froydnj at gcc dot gnu.org> ---
Thanks, I didn't think to test -O3.  Do we get the memset at -O3 because loop
idiom recognition is enabled?

Producing the memset upfront probably generates better code for all cases, even
if the frontend code is a little more complicated.


More information about the Gcc-bugs mailing list