Commit 5b62ee8a by Martin Jambor Committed by Martin Jambor

re PR middle-end/32964 (union cause inefficient code inside loops)

2009-08-06  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/32964
	* testsuite/gcc.dg/tree-ssa/pr32964.c: New test.

From-SVN: r150523
parent 4dbf26d5
2009-08-06 Martin Jambor <mjambor@suse.cz>
PR middle-end/32964
* gcc.dg/tree-ssa/pr32964.c: New test.
2009-08-06 Uros Bizjak <ubizjak@gmail.com>
H.J. Lu <hongjiu.lu@intel.com>
......
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
union A
{
float a;
};
float t(float a)
{
union A a1, a2, a3;
int i;
a1.a = a;
for(i = 0; i<100; i++)
{
a2 = a1;
a2.a += a;
a1 = a2;
}
a3 = a1;
return a3.a;
}
/* { dg-final { scan-tree-dump-times "union" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment