https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69289
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-bisection Known to work| |11.2.0, 12.0 Component|middle-end |tree-optimization Known to fail| |7.1.0, 8.1.0 --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks to be fixed in GCC 11.2.0 and GCC 12+. That is the memset is detected and transformed.