X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fopt_confirms.c;h=ef18b691ab62ecc1ae5e5b3caebd1f4c69cb8bdf;hb=4a4a27eb58ddce1b4a00a537fb8922a72cc370f4;hp=44ba41c8b93b505a2e2437715e6f4c4bb218523c;hpb=3aead500b32c6c8ca3a840bb3abb322bda598667;p=libfirm diff --git a/ir/opt/opt_confirms.c b/ir/opt/opt_confirms.c index 44ba41c8b..ef18b691a 100644 --- a/ir/opt/opt_confirms.c +++ b/ir/opt/opt_confirms.c @@ -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; + } } } }