From: Christian Würdig Date: Mon, 10 Jul 2006 12:21:35 +0000 (+0000) Subject: fixed am candidate checker (handle special case loops where the load could be depende... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=c8d67a0697a92a2913b96f3f0a7abb5d69ad413b;p=libfirm fixed am candidate checker (handle special case loops where the load could be dependent through memory phi on irn) --- diff --git a/ir/be/ia32/ia32_optimize.c b/ir/be/ia32/ia32_optimize.c index 2bc269f34..0736872fb 100644 --- a/ir/be/ia32/ia32_optimize.c +++ b/ir/be/ia32/ia32_optimize.c @@ -776,6 +776,8 @@ static ia32_am_cand_t is_am_candidate(ia32_code_gen_t *cg, heights_t *h, const i if (get_nodes_block(other) == block) { other = skip_Proj(other); is_cand = heights_reachable_in_block(h, other, load) ? 0 : is_cand; + /* this could happen in loops */ + is_cand = heights_reachable_in_block(h, load, irn) ? 0 : is_cand; } } @@ -794,6 +796,8 @@ static ia32_am_cand_t is_am_candidate(ia32_code_gen_t *cg, heights_t *h, const i if (get_nodes_block(other) == block) { other = skip_Proj(other); is_cand = heights_reachable_in_block(h, other, load) ? 0 : is_cand; + /* this could happen in loops */ + is_cand = heights_reachable_in_block(h, load, irn) ? 0 : is_cand; } }