From e40b97bd28e9d4316aecceb642337847d303d4de Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 18 Sep 2008 20:12:37 +0000 Subject: [PATCH] - removed redundant checks [r22094] --- ir/opt/ldstopt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index b608dac04..f5e2cb428 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -477,18 +477,14 @@ ptr_arith: tv_index = tarval_div(tv, sz); tv = tarval_mod(tv, sz); - if (tv_index == tarval_bad || tv == tarval_bad) - return NULL; + /* worked above, should work again */ + assert(tv_index != tarval_bad && tv != tarval_bad); /* bounds already checked above */ index = get_tarval_long(tv_index); set_compound_graph_path_array_index(res, pos, index); ++pos; } - if (! tarval_is_null(tv)) { - /* hmm, wrong access */ - return NULL; - } } else if (is_Sub(ptr)) { ir_node *l = get_Sub_left(ptr); ir_node *r = get_Sub_right(ptr); -- 2.20.1