diff options
author | Torbjorn Granlund <tege@gnu.org> | 1995-12-14 23:39:17 +0000 |
---|---|---|
committer | Torbjorn Granlund <tege@gnu.org> | 1995-12-14 23:39:17 +0000 |
commit | 34f016ed1f9ab59baa74e2b429b25e6d9ce9e80d (patch) | |
tree | 1c388ed40c37cc299169a158ac14f5572b140f74 /gcc | |
parent | f20200f4bc55067621823cd2f0ba9e87c18b4e17 (diff) | |
download | gcc-34f016ed1f9ab59baa74e2b429b25e6d9ce9e80d.zip gcc-34f016ed1f9ab59baa74e2b429b25e6d9ce9e80d.tar.gz gcc-34f016ed1f9ab59baa74e2b429b25e6d9ce9e80d.tar.bz2 |
(expand_divmod...
(expand_divmod, case TRUNC_DIV_EXPR): Only reject
larger-than-HOST_BITS_PER_WIDE_INT modes for general constants,
not for powers-of-2.
From-SVN: r10727
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expmed.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index b89a5f8..4341b99 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2835,7 +2835,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) { case TRUNC_MOD_EXPR: case TRUNC_DIV_EXPR: - if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size) + if (op1_is_constant) { if (unsignedp) { @@ -2870,7 +2870,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) if (quotient == 0) goto fail1; } - else + else if (size <= HOST_BITS_PER_WIDE_INT) { /* Find a suitable multiplier and right shift count instead of multiplying with D. */ @@ -2936,6 +2936,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) tquotient, 1); } } + else /* Too wide mode to use tricky code */ + break; insn = get_last_insn (); if (insn != last @@ -3029,7 +3031,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) quotient, quotient, 0); } } - else + else if (size <= HOST_BITS_PER_WIDE_INT) { choose_multiplier (abs_d, size, size - 1, &ml, &post_shift, &lgup); @@ -3081,6 +3083,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) tquotient); } } + else /* Too wide mode to use tricky code */ + break; insn = get_last_insn (); if (insn != last |