Commit eccc593f authored by Matthias Braun's avatar Matthias Braun
Browse files

iropt: Cmp(Nan, x) localopt rules

parent f1f48976
......@@ -671,6 +671,11 @@ ir_relation ir_get_possible_cmp_relations(const ir_node *left,
return possible;
/* NaN never compares successfully to anything */
if (tarval_is_nan(tv_l) || tarval_is_nan(tv_r)) {
return ir_relation_unordered;
/* a == a is never less or greater (but might be equal or unordered) */
if (left == right)
possible &= ~ir_relation_less_greater;
Markdown is supported
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