Commit 2d33a2ef by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/23141 (ACATS FAIL c45651a fixed point wrong code)


	PR 23141
	PR 23142
	* tree-vrp.c (vrp_meet): Fix the intersection of equivalence
	sets VR0->EQUIV and VR1->EQUIV when meeting a range and an
	anti-range.
	(vrp_visit_phi_node): Only prevent infinite iterations when
	the previous result and the new result are both VR_RANGEs.

From-SVN: r105436
parent 7b71de26
2005-10-15 Diego Novillo <dnovillo@redhat.com>
PR 23141
PR 23142
* tree-vrp.c (vrp_meet): Fix the intersection of equivalence
sets VR0->EQUIV and VR1->EQUIV when meeting a range and an
anti-range.
(vrp_visit_phi_node): Only prevent infinite iterations when
the previous result and the new result are both VR_RANGEs.
2005-10-15 Ranjit Mathew <rmathew@gcc.gnu.org> 2005-10-15 Ranjit Mathew <rmathew@gcc.gnu.org>
* tree-into-ssa.c (mark_def_sites): Correct minor typo in * tree-into-ssa.c (mark_def_sites): Correct minor typo in
......
...@@ -3497,8 +3497,11 @@ vrp_meet (value_range_t *vr0, value_range_t *vr1) ...@@ -3497,8 +3497,11 @@ vrp_meet (value_range_t *vr0, value_range_t *vr1)
&& !symbolic_range_p (vr1) && !symbolic_range_p (vr1)
&& !value_ranges_intersect_p (vr0, vr1)) && !value_ranges_intersect_p (vr0, vr1))
{ {
/* Copy most of VR1 into VR0. Don't copy VR1's equivalence
set. We need to compute the intersection of the two
equivalence sets. */
if (vr1->type == VR_ANTI_RANGE) if (vr1->type == VR_ANTI_RANGE)
copy_value_range (vr0, vr1); set_value_range (vr0, vr1->type, vr1->min, vr1->max, vr0->equiv);
/* The resulting set of equivalences is the intersection of /* The resulting set of equivalences is the intersection of
the two sets. */ the two sets. */
...@@ -3609,7 +3612,7 @@ vrp_visit_phi_node (tree phi) ...@@ -3609,7 +3612,7 @@ vrp_visit_phi_node (tree phi)
/* To prevent infinite iterations in the algorithm, derive ranges /* To prevent infinite iterations in the algorithm, derive ranges
when the new value is slightly bigger or smaller than the when the new value is slightly bigger or smaller than the
previous one. */ previous one. */
if (lhs_vr->type == VR_RANGE) if (lhs_vr->type == VR_RANGE && vr_result.type == VR_RANGE)
{ {
if (!POINTER_TYPE_P (TREE_TYPE (lhs))) if (!POINTER_TYPE_P (TREE_TYPE (lhs)))
{ {
......
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