This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/45970] New: tree DSE misses many obvious dead stores
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Oct 2010 14:40:15 +0000
- Subject: [Bug tree-optimization/45970] New: tree DSE misses many obvious dead stores
- Auto-submitted: auto-generated
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.).