From: Roger Sayle Date: Sun, 25 Jul 2004 00:25:28 +0000 (+0000) Subject: expmed.c (init_expmed): A signed modulus by a power of two is considered cheap if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b91e18c05ea23e01e786285a7c6725215201384;p=gcc.git expmed.c (init_expmed): A signed modulus by a power of two is considered cheap if... * expmed.c (init_expmed): A signed modulus by a power of two is considered cheap if its less than or equal to four instructions. From-SVN: r85134 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb9bea21d32..19dae5dbd01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-24 Roger Sayle + + * expmed.c (init_expmed): A signed modulus by a power of two is + considered cheap if its less than or equal to four instructions. + 2004-07-25 Bernardo Innocenti * ggc.h (GGC_NEW, GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, diff --git a/gcc/expmed.c b/gcc/expmed.c index d93351da2e7..9ceee9f923a 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -217,7 +217,7 @@ init_expmed (void) mul_cost[mode] = rtx_cost (&all.mult, SET); sdiv_pow2_cheap[mode] = (rtx_cost (&all.div, SET) <= 2 * add_cost[mode]); - smod_pow2_cheap[mode] = (rtx_cost (&all.mod, SET) <= 2 * add_cost[mode]); + smod_pow2_cheap[mode] = (rtx_cost (&all.mod, SET) <= 4 * add_cost[mode]); wider_mode = GET_MODE_WIDER_MODE (mode); if (wider_mode != VOIDmode)