summaryrefslogtreecommitdiffstats
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>1995-12-14 23:39:17 +0000
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>1995-12-14 23:39:17 +0000
commit61e477c74a1f4b76680e9e1cb3207504f5c4279b (patch)
tree1c388ed40c37cc299169a158ac14f5572b140f74 /gcc/expmed.c
parent35386fd86bd7611064c8db55efb6da51cdbead0a (diff)
downloadppe42-gcc-61e477c74a1f4b76680e9e1cb3207504f5c4279b.tar.gz
ppe42-gcc-61e477c74a1f4b76680e9e1cb3207504f5c4279b.zip
(expand_divmod, case TRUNC_DIV_EXPR): Only reject
larger-than-HOST_BITS_PER_WIDE_INT modes for general constants, not for powers-of-2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index b89a5f85213..4341b993031 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
OpenPOWER on IntegriCloud