From 7143a9a314a331e6554c07e9b0d52a039d6bccd1 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 9 Sep 2008 10:41:43 +0000 Subject: [PATCH] - even more restrictive: we only know that twos-complement can be placed into a IEEE 754 mantissa [r21775] --- 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 f0960120a..b4cf9fbcd 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1259,7 +1259,8 @@ restart: } } } - if (mode_is_int(n_mode) && get_mode_arithmetic(a_mode) == irma_ieee754) { + if (get_mode_arithmetic(n_mode) == irma_twos_complement && + get_mode_arithmetic(a_mode) == irma_ieee754) { /* ConvI(ConvF(I)) -> I, iff float mantissa >= int mode */ size_t int_mantissa = get_mode_size_bits(n_mode) - (mode_is_signed(n_mode) ? 1 : 0); size_t float_mantissa = tarval_ieee754_get_mantissa_size(a_mode); -- 2.20.1