diff options
author | Jeff Law <law@gcc.gnu.org> | 1998-04-03 09:37:26 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-04-03 09:37:26 -0700 |
commit | 31031eddacda46a500b2390f52cd4474bcaf84ca (patch) | |
tree | 28111445709b1e369e559db59f8c46cf5b81a203 /gcc/expmed.c | |
parent | 732dcb6f2a8254467d15cffc3cebf3467c4d010f (diff) | |
download | gcc-31031eddacda46a500b2390f52cd4474bcaf84ca.zip gcc-31031eddacda46a500b2390f52cd4474bcaf84ca.tar.gz gcc-31031eddacda46a500b2390f52cd4474bcaf84ca.tar.bz2 |
dummy commit before merge
From-SVN: r18980
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index fc04b37..7ac64c6 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1992,10 +1992,16 @@ synth_mult (alg_out, t, cost_limit) for (w = 1; (w & t) != 0; w <<= 1) ; - if (w > 2 - /* Reject the case where t is 3. - Thus we prefer addition in that case. */ - && t != 3) + /* If T was -1, then W will be zero after the loop. This is another + case where T ends with ...111. Handling this with (T + 1) and + subtract 1 produces slightly better code and results in algorithm + selection much faster than treating it like the ...0111 case + below. */ + if (w == 0 + || (w > 2 + /* Reject the case where t is 3. + Thus we prefer addition in that case. */ + && t != 3)) { /* T ends with ...111. Multiply by (T + 1) and subtract 1. */ |