X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flower%2Flower_intrinsics.c;h=bab53c600451e177ccf71660af03cdc229e32e6e;hb=b486451c68bbaec983ad0b2f919645ba0ee941e4;hp=64820716019805300be4387a2e2242909607f9fb;hpb=b7a0d752833eb7fb294ce90a27cbe01d06bbbc50;p=libfirm diff --git a/ir/lower/lower_intrinsics.c b/ir/lower/lower_intrinsics.c index 648207160..bab53c600 100644 --- a/ir/lower/lower_intrinsics.c +++ b/ir/lower/lower_intrinsics.c @@ -476,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)) { @@ -495,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)) { @@ -511,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. */ @@ -640,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;