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

            Bug ID: 63185
           Summary: Improve DSE with branches
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org

#include <stdlib.h>
#include <string.h>
void g();
void f(int n){
  char*p=malloc(1024);
  memset(p,8,1024);
  if(n)g();
}

We do not manage to remove the dead store (memset) because there is a PHI that
doesn't post-dominate the statement.

Reply via email to