[Bug tree-optimization/104276] memset is not elimited when followed by a store loop writing to that memory location
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 28 23:40:50 GMT 2022
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;
}
}
More information about the Gcc-bugs
mailing list