Commit 87eaee70 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

tv: Add 'tarval_is_minus_null()'.

parent 3324b350
......@@ -522,6 +522,13 @@ int tarval_is_all_one(ir_tarval const *tv)
return tv == get_tarval_mode(tv)->all_one && tv != tarval_bad;
bool tarval_is_minus_null(ir_tarval const *const tv)
const fp_value *val = (const fp_value*)tv->value;
return fc_is_negative(val) && fc_is_zero(val);
bool tarval_is_minus_one(ir_tarval const *tv)
......@@ -129,6 +129,8 @@ uint64_t get_tarval_uint64(ir_tarval const *tv);
bool tarval_is_uint64(ir_tarval const *tv);
bool tarval_is_minus_null(ir_tarval const *tv);
bool tarval_is_minus_one(ir_tarval const *tv);
ir_tarval *get_tarval_small(ir_mode *mode);
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