------- Comment #5 from rguenth at gcc dot gnu dot org 2007-02-19 12:56 -------
We can also simply check before the fact like
Index: tree-ssa-ccp.c
===================================================================
*** tree-ssa-ccp.c (revision 122127)
--- tree-ssa-ccp.c (working copy)
*************** visit_assignment (tree stmt, tree *outpu
*** 1212,1218 ****
&& operand_equal_p (nval->mem_ref, rhs, 0))
val = *nval;
else
! val = evaluate_stmt (stmt);
}
else
/* Evaluate the statement. */
--- 1212,1226 ----
&& operand_equal_p (nval->mem_ref, rhs, 0))
val = *nval;
else
! {
! val = evaluate_stmt (stmt);
! /* We need to be careful not to drop back to UNDEFINED from
! VARYING. This can happen because we only re-process the
! first virtual operand of a store. */
! if (val.lattice_val == UNDEFINED
! && get_value (lhs)->lattice_val > UNDEFINED)
! val.lattice_val = VARYING;
! }
}
else
/* Evaluate the statement. */
still not simulating the ssa edges for the other virtual operands does not
seem to be the best approach.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30840