This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/45970] New: tree DSE misses many obvious dead stores


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45970

           Summary: tree DSE misses many obvious dead stores
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


struct A { char c[4]; } a, b;

void
f1 (void)
{
  __builtin_memcpy (&a.c[0], "a", 1);
  a = b;
}

void
f2 (void)
{
  __builtin_memcpy (&a.c[0], "a", 1);
  __builtin_memcpy (&a.c[0], "cdef", 4);
}

isn't optimized by tree DSE.  RTL DSE can handle it, but only on some targets
(there are issues with calls to builtins if they were expanded as calls and
args aren't in registers etc.).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]