diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-09-07 22:10:34 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-09-07 22:10:34 +0000 |
commit | 03b70ee34603f69afd540f2a3bba8d0186968d97 (patch) | |
tree | 25672ec82aee28c93d020853108c2a4fb25566e1 /gcc/expmed.c | |
parent | 45e01ea1721631c32bb6306b24934adc84eb9baa (diff) | |
download | gcc-03b70ee34603f69afd540f2a3bba8d0186968d97.tar.gz |
* version.c: Bump for snapshot.
* expmed.c (expand_divmod): Make op1_is_pow2 depend on unsignedp
for negative constants. Promote EXACT_DIV_EXPR to TRUNC_DIV_EXPR
when op1_is_pow2.
* final.c (shorten_branches): During first pass, assume worst
possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns.
* Makefile.in (distclean): Remove various things left around
by running the testsuite.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 291e8d4aeea..fa3cc490a8c 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2718,7 +2718,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) op1_is_constant = GET_CODE (op1) == CONST_INT; op1_is_pow2 = (op1_is_constant && ((EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1)) - || EXACT_POWER_OF_2_OR_ZERO_P (-INTVAL (op1))))); + || (! unsignedp && EXACT_POWER_OF_2_OR_ZERO_P (-INTVAL (op1)))))); /* This is the structure of expand_divmod: @@ -2854,6 +2854,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) code = TRUNC_DIV_EXPR; if (code == FLOOR_MOD_EXPR) code = TRUNC_MOD_EXPR; + if (code == EXACT_DIV_EXPR && op1_is_pow2) + code = TRUNC_DIV_EXPR; } if (op1 != const0_rtx) |