Commit f4722b98 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

constbits, iropt: Make computed_value_Confirm() monotone.

parent 07d810c6
......@@ -289,6 +289,8 @@ result_unknown_X:
if (tarval_is_constant(computed)) {
z = o = computed;
goto set_info;
} else if (computed == tarval_bad) {
goto undefined;
}
switch (get_irn_opcode(irn)) {
......
......@@ -645,11 +645,18 @@ static ir_tarval *computed_value_Confirm(const ir_node *n)
const ir_relation possible = ir_get_possible_cmp_relations(value, bound);
const ir_relation relation = get_Confirm_relation(n);
if ((possible & relation) == ir_relation_equal) {
switch (possible & relation) {
case ir_relation_false:
return tarval_bad;
case ir_relation_equal: {
ir_tarval *tv = value_of(bound);
if (tarval_is_constant(tv))
return tv;
break;
}
}
return value_of(value);
}
......
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