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

            Bug ID: 93745
           Summary: Redundant store not eliminated with intermediate
                    instruction
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---

double d;
void f(long*p){
  long i=*p;
  d=3.;
  *p=i;
}

I would like *p=i to be eliminated. Without the unrelated intermediate line,
FRE1 does remove it. If I insert another load of *p after d=3., FRE1 replaces
it with i, so it knows that at that point *p and i are still the same.

Reply via email to