From: Matthias Braun Date: Fri, 11 Nov 2011 17:08:29 +0000 (+0100) Subject: iropt: use Confirm info for Cmp-relations X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=045e85c51e5223d5e6a1d739c3707707921e7ee1;p=libfirm iropt: use Confirm info for Cmp-relations --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index eaa0046fd..20ca9b13a 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -587,6 +587,15 @@ ir_relation ir_get_possible_cmp_relations(const ir_node *left, /* Alloc nodes never return null (but throw an exception) */ if (is_Alloc(left) && tarval_is_null(tv_r)) possible &= ~ir_relation_equal; + /* stuff known through confirm nodes */ + if (is_Confirm(left) && get_Confirm_bound(left) == right) { + possible &= get_Confirm_relation(left); + } + if (is_Confirm(right) && get_Confirm_bound(right) == left) { + ir_relation relation = get_Confirm_relation(right); + relation = get_inversed_relation(relation); + possible &= relation; + } return possible; }