X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fconst_stat.c;h=ffa88a32b10a113d61e0648404d0d734e0a7bf99;hb=dd4cd761ab637d4488c7e29f49843b1b02366acf;hp=fc2c2100976928666f2108322f3412defad533d3;hpb=f9b358aef749f11dfecf5fbfd1fd262dcd6b82c8;p=libfirm diff --git a/ir/stat/const_stat.c b/ir/stat/const_stat.c index fc2c21009..ffa88a32b 100644 --- a/ir/stat/const_stat.c +++ b/ir/stat/const_stat.c @@ -75,10 +75,12 @@ static float_classify_t classify_float_value(tarval *tv) { else if (tarval_is_finite(tv) && tarval_ieee754_zero_mantissa(tv)) { int exp = tarval_ieee754_get_exponent(tv); - if (exp == 1) - return STAT_FC_2; - else if (exp == -1) - return STAT_FC_0_5; + if (! tarval_is_negative(tv)) { + if (exp == 1) + return STAT_FC_2; + else if (exp == -1) + return STAT_FC_0_5; + } return STAT_FC_POWER_OF_TWO; } return STAT_FC_OTHER;