Commit 98c8808e authored by Michael Beck's avatar Michael Beck
Browse files

fixed classify_value() function

[r6049]
parent 29f9dd27
......@@ -138,8 +138,11 @@ value_classify classify_value_sign(ir_node *n)
c = mode_is_int(mode) && mode_honor_signed_zeros(mode) ?
get_mode_one(mode) : get_mode_null(mode);
ncmp = tarval_cmp(tv, c) ^ pn_Cmp_Eq;
if (cmp != ncmp)
ncmp = tarval_cmp(tv, c);
if (ncmp == pn_Cmp_Eq)
ncmp = pn_Cmp_Le;
if (cmp != (ncmp ^ pn_Cmp_Eq))
return VALUE_UNKNOWN;
/* yep, negative */
......@@ -158,8 +161,11 @@ value_classify classify_value_sign(ir_node *n)
if (mode_is_int(mode)) {
c = get_mode_minus_one(mode);
ncmp = tarval_cmp(tv, c) ^ pn_Cmp_Eq;
if (cmp != ncmp)
ncmp = tarval_cmp(tv, c);
if (ncmp == pn_Cmp_Eq)
ncmp = pn_Cmp_Ge;
if (cmp != (ncmp ^ pn_Cmp_Eq))
return VALUE_UNKNOWN;
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment