X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firarch.c;h=549b747c5a96d11a40405e43e2180d68152e70de;hb=26baaebd4406b34b8b04ef441d4e45e23c10a747;hp=351368770ee038462336a8361cf722b3d4365e71;hpb=b85d83c9ddf2624b42ceda13da413e3487e53a31;p=libfirm diff --git a/ir/ir/irarch.c b/ir/ir/irarch.c index 351368770..549b747c5 100644 --- a/ir/ir/irarch.c +++ b/ir/ir/irarch.c @@ -545,7 +545,7 @@ static ir_node *do_decomposition(ir_node *irn, ir_node *operand, tarval *tv) { inst = decompose_mul(&env, R, r, tv); /* the paper suggests 70% here */ - mul_costs = (env.evaluate(MUL, tv) * 7) / 10; + mul_costs = (env.evaluate(MUL, tv) * 7 + 5) / 10; if (evaluate_insn(&env, inst) <= mul_costs && !env.fail) { env.op = operand; env.blk = get_nodes_block(irn); @@ -634,7 +634,7 @@ static int tv_ld2(tarval *tv, int bits) { #define SHL(a, b) tarval_shl(a, b) #define SHR(a, b) tarval_shr(a, b) #define ADD(a, b) tarval_add(a, b) -#define SUB(a, b) tarval_sub(a, b) +#define SUB(a, b) tarval_sub(a, b, NULL) #define MUL(a, b) tarval_mul(a, b) #define DIV(a, b) tarval_div(a, b) #define MOD(a, b) tarval_mod(a, b)