diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-03-23 09:16:49 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-03-23 09:16:49 +0000 |
commit | c61928d098559fedd9032e4292740ba020103629 (patch) | |
tree | f57bc2c45645d0de0c1523653d3b9232bd871245 | |
parent | fb136e35c77e0374112189e3283c9ecf1e83abb1 (diff) | |
download | gcc-c61928d098559fedd9032e4292740ba020103629.zip gcc-c61928d098559fedd9032e4292740ba020103629.tar.gz gcc-c61928d098559fedd9032e4292740ba020103629.tar.bz2 |
[expmed][trivial] Fix comment about multiplying by T-1 and adding T.
* expmed.c (synth_mult): Fix comment about multiplying by T-1 and
adding T or multiplying by T+1 and subracting T.
From-SVN: r221588
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expmed.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b615c1f..d269b76 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * expmed.c (synth_mult): Fix comment about multiplying by T-1 and + adding T or multiplying by T+1 and subracting T. + 2015-03-22 Jeff Law <law@redhat.com> PR rtl-optimization/64317 diff --git a/gcc/expmed.c b/gcc/expmed.c index 8d4f964..e0b2619 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2611,7 +2611,7 @@ synth_mult (struct algorithm *alg_out, unsigned HOST_WIDE_INT t, Thus we prefer addition in that case. */ && t != 3)) { - /* T ends with ...111. Multiply by (T + 1) and subtract 1. */ + /* T ends with ...111. Multiply by (T + 1) and subtract T. */ op_cost = add_cost (speed, mode); new_limit.cost = best_cost.cost - op_cost; @@ -2630,7 +2630,7 @@ synth_mult (struct algorithm *alg_out, unsigned HOST_WIDE_INT t, } else { - /* T ends with ...01 or ...011. Multiply by (T - 1) and add 1. */ + /* T ends with ...01 or ...011. Multiply by (T - 1) and add T. */ op_cost = add_cost (speed, mode); new_limit.cost = best_cost.cost - op_cost; |