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. */
ir_mode *mode = get_irn_mode(op);
dbg_info *dbg = get_irn_dbg_info(call);
ir_node *zero = new_r_Const(irg, get_mode_null(mode));
- ir_node *cmp = new_rd_Cmp(dbg, block, op, zero);
- ir_node *cond = new_r_Proj(cmp, mode_b, pn_Cmp_Lt);
+ ir_node *cmp = new_rd_Cmp(dbg, block, op, zero, ir_relation_less);
ir_node *minus_op = new_rd_Minus(dbg, block, op, mode);
ir_node *mux;
arch_allow_ifconv_func allow_ifconv = be_get_backend_param()->allow_ifconv;
(void) ctx;
/* mux allowed by backend? */
- if (!allow_ifconv(cond, op, minus_op))
+ if (!allow_ifconv(cmp, op, minus_op))
return 0;
/* construct Mux */
- mux = new_rd_Mux(dbg, block, cond, op, minus_op, mode);
+ mux = new_rd_Mux(dbg, block, cmp, op, minus_op, mode);
DBG_OPT_ALGSIM0(call, mux, FS_OPT_RTS_ABS);
replace_call(mux, call, mem, NULL, NULL);
return 1;
if (irn == NULL) {
ir_mode *mode = get_irn_mode(left);
- ir_node *quot;
+ ir_node *div;
irn = new_r_Const(irg, get_mode_one(mode));
- quot = new_rd_Quot(dbg, block, mem, irn, left, mode, op_pin_state_pinned);
- mem = new_r_Proj(quot, mode_M, pn_Quot_M);
- irn = new_r_Proj(quot, mode, pn_Quot_res);
- reg_jmp = new_r_Proj(quot, mode_X, pn_Quot_X_regular);
- exc_jmp = new_r_Proj(quot, mode_X, pn_Quot_X_except);
+ div = new_rd_Div(dbg, block, mem, irn, left, mode, op_pin_state_pinned);
+ mem = new_r_Proj(div, mode_M, pn_Div_M);
+ irn = new_r_Proj(div, mode, pn_Div_res);
+ reg_jmp = new_r_Proj(div, mode_X, pn_Div_X_regular);
+ exc_jmp = new_r_Proj(div, mode_X, pn_Div_X_except);
}
DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_POW);
replace_call(irn, call, mem, reg_jmp, exc_jmp);
*/
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)) {
}
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)) {
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. */
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;
{
switch (get_irn_opcode(node)) {
case iro_Load: return get_Load_mode(node);
- case iro_Quot: return get_Quot_resmode(node);
case iro_Div: return get_Div_resmode(node);
case iro_Mod: return get_Mod_resmode(node);
default: return NULL;