From: Andreas Zwinkau Date: Tue, 26 Apr 2011 12:04:00 +0000 (+0200) Subject: Fix opt/ldst.c X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=99253d30b9d32d58de6411b583dce72ede4261fd;p=libfirm Fix opt/ldst.c A Load might not have a ProjM --- diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index f69fbf66a..fe175a9ce 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -709,7 +709,8 @@ static void handle_load_update(ir_node *load) ir_node *mem = get_Load_mem(load); /* a Load whose value is neither used nor exception checked, remove it */ - exchange(info->projs[pn_Load_M], mem); + if (info->projs[pn_Load_M]) + exchange(info->projs[pn_Load_M], mem); if (info->projs[pn_Load_X_regular]) exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load))); kill_node(load);