Commit fbe7e2f5 by Richard Henderson Committed by Richard Henderson

re PR tree-optimization/22022 (ACATS ICE cxg1002 tree_split_edge, at tree-cfg.c:3025)

        PR tree-opt/22022
        * tree-complex.c (update_phi_components): Avoid no-op moves.

From-SVN: r101121
parent 73194ef6
2005-06-16 Richard Henderson <rth@redhat.com>
PR tree-opt/22022
* tree-complex.c (update_phi_components): Avoid no-op moves.
2005-06-16 Joseph S. Myers <joseph@codesourcery.com>
* Makefile.in (cc1-checksum.c): Use
......
// PR 22022
// { dg-do compile }
// { dg-options "-O2" }
_Complex float f();
_Complex float g();
_Complex float h()throw();
void i(_Complex float)throw();
void j(void)
{
_Complex float x = h();
try
{
try
{
x = f();
}catch (...)
{
x = g();
}
}catch(...){}
i(x);
}
// PR 22022
// { dg-do compile }
// { dg-options "-O2" }
_Complex float f();
_Complex float g();
_Complex float h()throw();
void i(float)throw();
float j(void)
{
_Complex float x = h();
try
{
try
{
x = f();
}catch (...)
{
x += g();
}
}catch(...){}
i(__builtin_crealf(x)+__builtin_cimagf(x));
}
......@@ -577,6 +577,12 @@ update_phi_components (basic_block bb)
tree arg = PHI_ARG_DEF (phi, i);
tree r, i;
/* Avoid no-op assignments. This also prevents insertting stmts
onto abnormal edges, assuming the PHI isn't already broken. */
if (TREE_CODE (arg) == SSA_NAME
&& SSA_NAME_VAR (arg) == SSA_NAME_VAR (lhs))
continue;
r = extract_component (NULL, arg, 0, false);
i = extract_component (NULL, arg, 1, false);
update_complex_components_on_edge (e, NULL, lhs, r, i);
......
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