Commit 045e85c5 authored by Matthias Braun's avatar Matthias Braun
Browse files

iropt: use Confirm info for Cmp-relations

parent 3aa53a8a
......@@ -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;
}
......
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