diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-07-03 16:39:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-07-03 16:39:05 +0200 |
commit | 00a7ba584062ce49f20fd9e10e5396b296b0a7b5 (patch) | |
tree | 0f9f89a40e0f06ad2065a6c8389c198699c9f249 /gcc/expmed.c | |
parent | e21526739585ce47c37e40c1da738ba42c7a7e02 (diff) | |
download | gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.zip gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.tar.gz gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.tar.bz2 |
gcov-io.c (gcov_read_words): Don't call memmove if excess is 0.
* gcov-io.c (gcov_read_words): Don't call memmove if excess is 0.
* data-streamer-in.c (streamer_read_hwi): Shift UHWI 1 instead of
HWI 1 and negate the unsigned value.
* expmed.c (expand_sdiv_pow2): For modes wider than word always
use AND instead of shift.
* wide-int-print.cc (print_decs): Negate UHWI instead of HWI.
c-family/
* c-ada-spec.c (dump_ada_nodes): Don't call qsort if
comments->count <= 1, as comments->entries might be NULL.
From-SVN: r212264
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 861626e..36c4346 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3795,8 +3795,9 @@ expand_sdiv_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d) temp = gen_reg_rtx (mode); temp = emit_store_flag (temp, LT, op0, const0_rtx, mode, 0, -1); - if (shift_cost (optimize_insn_for_speed_p (), mode, ushift) - > COSTS_N_INSNS (1)) + if (GET_MODE_BITSIZE (mode) >= BITS_PER_WORD + || shift_cost (optimize_insn_for_speed_p (), mode, ushift) + > COSTS_N_INSNS (1)) temp = expand_binop (mode, and_optab, temp, gen_int_mode (d - 1, mode), NULL_RTX, 0, OPTAB_LIB_WIDEN); else |