From: Matthias Braun Date: Fri, 8 Jun 2007 18:25:57 +0000 (+0000) Subject: fix wrong panic X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=9f4c0214668b6955f36c1a03b957721a9f62f1ef;p=libfirm fix wrong panic [r14386] --- diff --git a/ir/be/bespilldaemel.c b/ir/be/bespilldaemel.c index eecc35748..0d0bbd829 100644 --- a/ir/be/bespilldaemel.c +++ b/ir/be/bespilldaemel.c @@ -203,15 +203,15 @@ void do_spilling(daemel_env_t *env, ir_nodeset_t *nodes, ir_node *node) /* spill cheapest ones */ cand_idx = 0; while(spills_needed > 0) { + if(cand_idx >= node_count) { + panic("can't spill enough values for node %+F\n", node); + } + spill_candidate_t *candidate = &candidates[cand_idx]; ir_node *cand_node = candidate->node; int is_use; ++cand_idx; - if(cand_idx >= node_count) { - panic("can't spill enough values for node %+F\n", node); - } - /* make sure the node is not a use of the instruction */ is_use = 0; for(i = 0; i < arity; ++i) {