From 95048bd90b04d52c0e527f2173a93912311015ef Mon Sep 17 00:00:00 2001 From: Jonas Fietz Date: Wed, 17 Mar 2010 20:16:29 +0000 Subject: [PATCH] Fix bug, where only partial information was set for confirm nodes [r27311] --- ir/ana/vrp.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/ir/ana/vrp.c b/ir/ana/vrp.c index 62961a424..74e4a11fd 100644 --- a/ir/ana/vrp.c +++ b/ir/ana/vrp.c @@ -338,33 +338,19 @@ static int vrp_update_node(ir_node *node) pn_Cmp cmp = get_Confirm_cmp(node); ir_node *bound = get_Confirm_bound(node); - /** @todo: Handle non-Const bounds */ if (cmp == pn_Cmp_Lg) { - /** @todo: Is there some way to preserve the information? */ - new_range_type = VRP_ANTIRANGE; + /** @todo: Handle non-Const bounds */ if (is_Const(bound)) { + new_range_type = VRP_ANTIRANGE; new_range_top = get_Const_tarval(bound); new_range_bottom = get_Const_tarval(bound); } } else if (cmp == pn_Cmp_Le) { - if (vrp->range_type == VRP_UNDEFINED) { + if (is_Const(bound)) { new_range_type = VRP_RANGE; - if (is_Const(bound)) { - new_range_top = get_Const_tarval(bound); - } + new_range_top = get_Const_tarval(bound); new_range_bottom = get_tarval_min(get_irn_mode(node)); - } else if (vrp->range_type == VRP_RANGE) { - if (is_Const(bound)) { - if (tarval_cmp(vrp->range_top, - get_Const_tarval(bound)) == pn_Cmp_Le) { - new_range_top = get_Const_tarval(bound); - } - new_range_bottom = get_tarval_min(get_irn_mode(node)); - - } else if (vrp->range_type == VRP_ANTIRANGE) { - /** @todo: How do we manage not to get a never ending loop? */ - } } } break; -- 2.20.1