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

            Bug ID: 92750
           Summary: DSE fails to remove all dead clobbers
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

In PR92645 I see DSE1 doing

   MEM[(struct Vec *)&s] = _74;
   MEM[(struct Vec *)&a] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a] ={v} {CLOBBER};
   _73 = (unsigned char) invA_8;
   MEM[(struct Vec *)&a].val = _73;
   MEM[(struct Vec *)&a + 1B] ={v} {CLOBBER};
   MEM[(struct Vec *)&a + 1B].val = _73;
   MEM[(struct Vec *)&a + 2B] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a + 2B] ={v} {CLOBBER};
   MEM[(struct Vec *)&a + 2B].val = _73;
   MEM[(struct Vec *)&a + 3B] ={v} {CLOBBER};
   MEM[(struct Vec *)&a + 3B].val = _73;
   MEM[(struct Vec *)&a + 4B] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a + 4B] ={v} {CLOBBER};
-  MEM[(struct Vec *)&a + 4B] ={v} {CLOBBER};
   MEM[(struct Vec *)&a + 4B].val = _73;
   MEM[(struct Vec *)&a + 5B] ={v} {CLOBBER};
...

as you can see it removes all but one clobber but there's still a real must-def
that should make the last clobber dead as well.

Reply via email to