This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/39761] New: ccp does not fully propagate constant real/imaginary parts
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Apr 2009 08:54:46 -0000
- Subject: [Bug tree-optimization/39761] New: ccp does not fully propagate constant real/imaginary parts
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
>From this testcase:
void bar();
void foo(int i)
{
__complex__ int k = 0;
if (i)
k = 1;
if (k)
bar();
}
(cfr. gcc.c-torture/compile/pr35431.c) we get after cddce1:
# k_1 = PHI <__complex__ (0, 0)(2), __complex__ (1, 0)(3)>
D.1198_6 = REALPART_EXPR <k_1>;
if (D.1198_6 != 0)
goto <bb 6>;
else
goto <bb 5>;
<bb 5>:
D.1200_7 = IMAGPART_EXPR <k_1>;
if (D.1200_7 != 0)
goto <bb 6>;
else
goto <bb 7>;
and the IMAGPART_EXPR could be CCP'd or FRE'd to zero. Likewise the
REALPART_EXPR could be FRE'd to PHI <0(2), 1(3)>.
--
Summary: ccp does not fully propagate constant real/imaginary
parts
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39761