aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1993-11-01 11:18:32 +0000
committerTorbjorn Granlund <tege@gnu.org>1993-11-01 11:18:32 +0000
commitc0b262c16625f8e9650ce58fb299d1cef5383dbd (patch)
tree3870eeba4a27d83f8e0c0634e47cf6adcfd74cd3 /gcc
parent9022605c7e857267d092cfc3fc552fd1b08d94fb (diff)
downloadgcc-c0b262c16625f8e9650ce58fb299d1cef5383dbd.zip
gcc-c0b262c16625f8e9650ce58fb299d1cef5383dbd.tar.gz
gcc-c0b262c16625f8e9650ce58fb299d1cef5383dbd.tar.bz2
(synth_mult): When factoring T, break from loop after first factor.
(expand_mult): Increase max cost to 12 again. From-SVN: r5961
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expmed.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index b340b6d..fe8eb27 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1971,6 +1971,8 @@ synth_mult (alg_out, t, cost_limit)
best_alg->op[best_alg->ops] = alg_add_factor;
cost_limit = cost;
}
+ /* Other factors will have been taken care of in the recursion. */
+ break;
}
d = ((unsigned HOST_WIDE_INT) 1 << m) - 1;
@@ -1988,6 +1990,7 @@ synth_mult (alg_out, t, cost_limit)
best_alg->op[best_alg->ops] = alg_sub_factor;
cost_limit = cost;
}
+ break;
}
}
@@ -2103,7 +2106,7 @@ expand_mult (mode, op0, op1, target, unsignedp)
vice versa. */
mult_cost = rtx_cost (gen_rtx (MULT, mode, op0, op1), SET);
- mult_cost = MIN (8 * add_cost, mult_cost);
+ mult_cost = MIN (12 * add_cost, mult_cost);
synth_mult (&alg, val, mult_cost);
synth_mult (&neg_alg, - val,