This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25528] New: missed LIM on the tree level (complex types)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Dec 2005 04:46:17 -0000
- Subject: [Bug tree-optimization/25528] New: missed LIM on the tree level (complex types)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following code:
int f(void)
{
static _Complex double t;
int i, j;
for(i = 0;i<2;i++)
for(j = 0;j<2;j++)
t *= .5 * 1.0;
return t;
}
---
At -O1, we get on the tree level for the loop:
<L7>:;
CI.33 = IMAGPART_EXPR <t> * 5.0e-1;
REALPART_EXPR <t> = REALPART_EXPR <t> * 5.0e-1;
IMAGPART_EXPR <t> = CI.33;
REALPART_EXPR <t> = REALPART_EXPR <t> * 5.0e-1;
IMAGPART_EXPR <t> = CI.33 * 5.0e-1;
i = i + 1;
if (i != 2) goto <L7>; else goto <L5>;
The stores to t is not pulled at all out of the loop.
--
Summary: missed LIM on the tree level (complex types)
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25528