From 00a7ba584062ce49f20fd9e10e5396b296b0a7b5 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 3 Jul 2014 16:39:05 +0200 Subject: 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 --- gcc/expmed.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/expmed.c') 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 -- cgit v1.1