From: J"orn Rennecke Date: Wed, 30 Jun 2004 12:30:00 +0000 (+0000) Subject: * expmed.c (expand_smod_pow2): Fix sign of mask. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c6fd544cc2702f5ce92a7e12b8d287f48b140ad;p=gcc.git * expmed.c (expand_smod_pow2): Fix sign of mask. From-SVN: r83905 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d74a3c520f..e18d36ff1a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-06-30 J"orn Rennecke + + * expmed.c (expand_smod_pow2): Fix sign of mask. + 2004-06-29 Diego Novillo * tree-ssa-pre.c (phi_trans_add): Use is_gimple_min_invariant diff --git a/gcc/expmed.c b/gcc/expmed.c index bb60ba1e832..a2278b9d8c1 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3124,7 +3124,7 @@ expand_smod_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d) can avoid an explicit compare operation in the following comparison against zero. */ - mask = (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1) + mask = (HOST_WIDE_INT) -1 << (GET_MODE_BITSIZE (mode) - 1) | (((HOST_WIDE_INT) 1 << logd) - 1); temp = expand_binop (mode, and_optab, op0, GEN_INT (mask), result,