From: Matthias Braun Date: Sat, 13 Dec 2008 15:48:54 +0000 (+0000) Subject: fix fc_can_lossless_conv_to (I hope this is correct) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=a7a3ee1e12b2d3854a5600a69d8bd14ac3369fc4;p=libfirm fix fc_can_lossless_conv_to (I hope this is correct) [r24599] --- diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index b35a23649..639f84815 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -1525,7 +1525,7 @@ int fc_can_lossless_conv_to(const fp_value *value, const ieee_descriptor_t *desc if (0 < v && v < (1 << desc->exponent_size) - 1) { /* exponent can be encoded, now check the mantissa */ v = value->desc.mantissa_size + ROUNDING_BITS - sc_get_lowest_set_bit(_mant(value)); - return v < desc->mantissa_size; + return v <= desc->mantissa_size; } return 0; }