use .word instead of .value, older gas don't support it
[libfirm] / ir / opt / opt_confirms.c
index 44ba41c..ef18b69 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -184,16 +184,16 @@ int value_not_null(ir_node *n, ir_node **confirm) {
        if (op == op_SymConst && get_SymConst_kind(n) == symconst_addr_ent)
                return 1;
        if (op == op_Const) {
-               tarval *tv = get_Const_tarval(n);
-
-               if (tv != tarval_bad && classify_tarval(tv) != TV_CLASSIFY_NULL)
+               if (!is_Const_null(n))
                        return 1;
        } else {
                for (; is_Confirm(n); n = skip_Cast(get_Confirm_value(n))) {
-                       if (get_Confirm_cmp(n) == pn_Cmp_Lg &&
-                               classify_Const(get_Confirm_bound(n)) == CNST_NULL) {
+                       if (get_Confirm_cmp(n) != pn_Cmp_Lg) {
+                               ir_node *bound = get_Confirm_bound(n);
+                               if (is_Const(bound) && is_Const_null(bound)) {
                                        *confirm = n;
                                        return 1;
+                               }
                        }
                }
        }