simplify transform_node_Mux by using is_single_bit
[libfirm] / ir / ir / irargs.c
index b36138b..5af12d1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -118,7 +118,7 @@ static int firm_emit(lc_appendable_t *app,
 
        void *X = (void*)arg->v_ptr;
        firm_kind *obj = (firm_kind*)X;
-       int i, n;
+       size_t i, n;
        ir_node *block;
        char add[64];
        char buf[256];
@@ -189,6 +189,9 @@ static int firm_emit(lc_appendable_t *app,
                        } else if (is_Sel(node)) {
                                snprintf(buf, sizeof(buf), "%s%s %s[%s]", A("irn"), get_irn_opname(node),
                                get_mode_name(get_irn_mode(node)), get_entity_name(get_Sel_entity(node)));
+                       } else if (is_Cmp(node)) {
+                               ir_relation relation = get_Cmp_relation(node);
+                               snprintf(buf, sizeof(buf), "%s%s %s", A("irn"), get_irn_opname(node), get_relation_string(relation));
                        } else {
                                snprintf(buf, sizeof(buf), "%s%s %s", A("irn"), get_irn_opname(node),
                                get_mode_name(get_irn_mode(node)));
@@ -290,7 +293,7 @@ static int firm_emit_pnc(lc_appendable_t *app,
     const lc_arg_occ_t *occ, const lc_arg_value_t *arg)
 {
        int value = arg->v_int;
-       const char *p = get_pnc_string(value);
+       const char *p = get_relation_string(value);
 
        return lc_arg_append(app, occ, p, strlen(p));
 }