+ if (cmp == NULL || cmp_in_phi > 1 || out_loop_res == 0) return;
+
+ if (get_irn_op(get_Cmp_left(cmp)) == op_Const)
+ cmp_const = get_Cmp_left(cmp);
+ else
+ cmp_const = get_Cmp_right(cmp);
+
+ if (get_irn_loop(get_nodes_block(cmp)) != l_itervar_phi) return;
+
+#if 1
+ printf("It is possibale to exchange the Cmp with a new Cmp \n");
+ printf("The constant of Cmp node is: "); DDMN(cmp_const);
+ printf("The Phi node is"); DDMN(itervar_phi);
+ printf("Cmp node: "); DDMN(cmp);
+ printf(" in graph "); DDMG(current_ir_graph);
+#endif
+
+ ir_node *new_cmp_const, *new_cmp, *cmp_const_block = get_nodes_block(cmp_const);
+
+ if (get_Block_dom_depth(init_block) >= get_Block_dom_depth(cmp_const_block))
+ block_init = init_block;
+ else
+ block_init = cmp_const_block;
+
+ new_cmp_const = new_r_Mul (current_ir_graph, block_init, cmp_const,
+ c, get_irn_mode(ivi.init));
+ new_cmp = new_r_Cmp (current_ir_graph, get_nodes_block(cmp),
+ new_phi, new_cmp_const);
+ exchange(cmp, new_cmp);