https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79716
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > Confirmed. The issue is that DSE does not track variable-size stores like > this > and thus stmt_kills_ref_p (temp, ref) returns false for memcpy and the ref > for memset (which ends up with unknown size). The most obvious example for this is probably void f(char*p,unsigned long n){ __builtin_memset(p,0,n); __builtin_memset(p,255,n); } where GIMPLE really has just those 2 statements, and we fail to remove the first one.