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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Fail to eliminate deadstore |memset is not elimited when
                   |from vector constructor     |followed by a store loop
                   |                            |writing to that memory
                   |                            |location
   Last reconfirmed|                            |2022-01-28
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simplified C testcase (without std::vector usage):

#define SZ 4096

void foo1(int *a) {
    __builtin_memset(a, 0, sizeof(int)*SZ);
    for (int n = 0; n < SZ; ++n) {
        a[n] = n;
    }
}

Reply via email to