aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDenis Chertykov <denisc@overta.ru>2000-11-06 11:39:54 +0300
committerDenis Chertykov <denisc@gcc.gnu.org>2000-11-06 11:39:54 +0300
commit1cf7847fed4624383e4f1e7a0e0021f553d0c151 (patch)
treec68bcda897f4f0eb718da6a00457202977669dc9 /gcc
parent099a51500cccdff68d8dfeec726f29b60ad1d546 (diff)
downloadgcc-1cf7847fed4624383e4f1e7a0e0021f553d0c151.zip
gcc-1cf7847fed4624383e4f1e7a0e0021f553d0c151.tar.gz
gcc-1cf7847fed4624383e4f1e7a0e0021f553d0c151.tar.bz2
expmed.c (expand_divmod): For signed divide by 2, prefer a branch and fewer shifts if branches are very cheap.
* expmed.c (expand_divmod): For signed divide by 2, prefer a branch and fewer shifts if branches are very cheap. From-SVN: r37270
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expmed.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index da60ee0..1857009 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sat Sep 23 19:10:20 2000 Denis Chertykov <denisc@overta.ru> & Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * expmed.c (expand_divmod): For signed divide by 2, prefer
+ a branch and fewer shifts if branches are very cheap.
+
2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
* Makefile.in: Remove all targets related to building
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 254d052..012a68e 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3258,7 +3258,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d))
{
lgup = floor_log2 (abs_d);
- if (abs_d != 2 && BRANCH_COST < 3)
+ if (BRANCH_COST < 1 || (abs_d != 2 && BRANCH_COST < 3))
{
rtx label = gen_label_rtx ();
rtx t1;