This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21574] New: store_ccp doesn't see through a store.
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2005 21:14:39 -0000
- Subject: [Bug tree-optimization/21574] New: store_ccp doesn't see through a store.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider:
int
foo (int *p)
{
*p = 0;
return *p;
}
Here is what I get after store_ccp (with -fno-tree-dominator-opts)
foo (p)
{
int D.1233;
<bb 0>:
# TMT.0_5 = V_MAY_DEF <TMT.0_4>;
*p_1 = 0;
# VUSE <TMT.0_5>;
D.1233_2 = *p_1;
return D.1233_2;
}
Note that the return statement isn't changed to "return 0;".
--
Summary: store_ccp doesn't see through a store.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21574