X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flower%2Flower_intrinsics.c;h=bab53c600451e177ccf71660af03cdc229e32e6e;hb=32fc212e2d06debb2ac9ee30b5ff237e076b03e6;hp=9495023ba0a07f943cced5a7279f4319693932c2;hpb=af300963705d97b2f596e8cf2887813c25de6ad8;p=libfirm diff --git a/ir/lower/lower_intrinsics.c b/ir/lower/lower_intrinsics.c index 9495023ba..bab53c600 100644 --- a/ir/lower/lower_intrinsics.c +++ b/ir/lower/lower_intrinsics.c @@ -236,7 +236,6 @@ static void replace_call(ir_node *irn, ir_node *call, ir_node *mem, ir_node *reg set_Tuple_pred(call, pn_Call_X_regular, reg_jmp); set_Tuple_pred(call, pn_Call_X_except, exc_jmp); set_Tuple_pred(call, pn_Call_T_result, irn); - set_Tuple_pred(call, pn_Call_P_value_res_base, new_r_Bad(irg)); } /* replace_call */ /* A mapper for the integer abs. */ @@ -477,7 +476,8 @@ static int i_mapper_one_to_zero(ir_node *call, void *ctx, int reason) */ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason) { - ir_node *val = get_Call_param(call, 0); + int changed = 0; + ir_node *val = get_Call_param(call, 0); (void) ctx; if (is_strictConv(val)) { @@ -496,12 +496,14 @@ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason) } DBG_OPT_ALGSIM2(call, op, call, FS_OPT_RTS_SYMMETRIC); set_Call_param(call, 0, val); + changed = 1; } } else if (is_Minus(val)) { /* f(-x) = f(x) */ val = get_Minus_op(val); DBG_OPT_ALGSIM2(call, val, call, FS_OPT_RTS_SYMMETRIC); set_Call_param(call, 0, val); + changed = 1; } if (is_Const(val) && is_Const_null(val)) { @@ -512,9 +514,9 @@ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason) ir_node *mem = get_Call_mem(call); DBG_OPT_ALGSIM0(call, irn, reason); replace_call(irn, call, mem, NULL, NULL); - return 1; + changed = 1; } - return 0; + return changed; } /* i_mapper_symmetric_zero_to_one */ /* A mapper for the floating point log. */ @@ -641,8 +643,8 @@ static ir_node *eval_strlen(ir_graph *irg, ir_entity *ent, ir_type *res_tp) ir_type *tp = get_entity_type(ent); ir_mode *mode; ir_initializer_t *initializer; - unsigned size; - unsigned i; + size_t size; + size_t i; if (! is_Array_type(tp)) return NULL;