From f8ebd04aadcde3b2b98a43f695698d1de5388ebc Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 10 Nov 2004 17:11:38 +0000 Subject: [PATCH] BugFix: a == a is not always True for floating point, it is false if one of them are a NaN ... [r4363] --- ir/ir/iropt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index e1a22d5f1..03ff12dbd 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -425,7 +425,8 @@ static tarval *computed_value_Proj(ir_node *n) ab = get_Cmp_right(a); proj_nr = get_Proj_proj(n); - if (aa == ab) { /* 1.: */ + if (aa == ab && !mode_is_float(get_irn_mode(aa))) { /* 1.: */ + /* BEWARE: a == a is NOT always True for floating Point!!! */ /* 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 (proj_nr == Eq, mode_b) */ -- 2.20.1