X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firopt.c;h=0c7cf979ae8f470c81f26de68611afad451fc02c;hb=7719bf6a7bd442f4763731d56d856cb082156877;hp=be0d5db5fad34b62264e38829440383a5a393101;hpb=413caa540c4f2d6456cf5cfba73eecffad4fd160;p=libfirm diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index be0d5db5f..0c7cf979a 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -487,10 +487,8 @@ static tarval *computed_value_Proj_Cmp(const ir_node *n) /* * BEWARE: a == a is NOT always True for floating Point values, as * NaN != NaN is defined, so we must check this here. - * (Note: Some pnc do still allow optimisations but we don't do them - * here because we would get inconsistent with combos compute_Cmp then) */ - if (left == right && !mode_is_float(mode)) { + if (left == right && (!mode_is_float(mode) || pn_cmp == pn_Cmp_Lt || pn_cmp == pn_Cmp_Gt)) { /* This is a trick with the bits used for encoding the Cmp Proj numbers, the following statement is not the same: return new_tarval_from_long(pn_cmp == pn_Cmp_Eq, mode_b) */