Commit 60fdb51a authored by Matthias Braun's avatar Matthias Braun
Browse files

fix doz stuff

[r26988]
parent 86c66a17
......@@ -3016,10 +3016,15 @@ static ir_node *create_set_32bit(dbg_info *dbgi, ir_node *new_block,
/**
* Create instruction for an unsigned Difference or Zero.
*/
static ir_node *create_Doz(ir_node *psi, ir_node *a, ir_node *b)
static ir_node *create_doz(ir_node *psi, ir_node *a, ir_node *b)
{
ir_mode *mode = get_irn_mode(psi);
ir_node *new_node, *sub, *sbb, *eflags, *block;
ir_node *new_node;
ir_node *sub;
ir_node *sbb;
ir_node *not;
ir_node *eflags;
ir_node *block;
dbg_info *dbgi;
......@@ -3040,8 +3045,9 @@ static ir_node *create_Doz(ir_node *psi, ir_node *a, ir_node *b)
dbgi = get_irn_dbg_info(psi);
sbb = new_bd_ia32_Sbb0(dbgi, block, eflags);
not = new_bd_ia32_Not(dbgi, block, sbb);
new_node = new_bd_ia32_And(dbgi, block, noreg_GP, noreg_GP, nomem, new_node, sbb);
new_node = new_bd_ia32_And(dbgi, block, noreg_GP, noreg_GP, nomem, new_node, not);
set_ia32_commutative(new_node);
return new_node;
}
......@@ -3245,12 +3251,12 @@ static ir_node *gen_Mux(ir_node *node)
is_Const_0(mux_false) && is_Sub(mux_true) &&
get_Sub_left(mux_true) == cmp_left && get_Sub_right(mux_true) == cmp_right) {
/* Mux(a >=u b, a - b, 0) unsigned Doz */
return create_Doz(node, cmp_left, cmp_right);
return create_doz(node, cmp_left, cmp_right);
} else if ((pnc & pn_Cmp_Lt) && !mode_is_signed(mode) &&
is_Const_0(mux_true) && is_Sub(mux_false) &&
get_Sub_left(mux_false) == cmp_left && get_Sub_right(mux_false) == cmp_right) {
/* Mux(a <=u b, 0, a - b) unsigned Doz */
return create_Doz(node, cmp_left, cmp_right);
return create_doz(node, cmp_left, cmp_right);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment