aboutsummaryrefslogtreecommitdiff
path: root/gcc/fwprop.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-10-13 09:53:00 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-10-13 09:53:00 +0000
commit250a60f3879d2d508d0d08e9da1dfa1648e1a369 (patch)
treefc2db3da8cc97b1a2250ffa755f81ed79f7052be /gcc/fwprop.c
parentfb98441af9c84caef6a0e3210ace4b8ffc7e3840 (diff)
downloadgcc-250a60f3879d2d508d0d08e9da1dfa1648e1a369.zip
gcc-250a60f3879d2d508d0d08e9da1dfa1648e1a369.tar.gz
gcc-250a60f3879d2d508d0d08e9da1dfa1648e1a369.tar.bz2
Make more use of GET_MODE_UNIT_BITSIZE
This patch is like the previous GET_MODE_UNIT_SIZE one, but for bit rather than byte sizes. 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE. (expand_debug_source_expr): Likewise. * combine.c (combine_simplify_rtx): Likewise. * cse.c (fold_rtx): Likewise. * fwprop.c (canonicalize_address): Likewise. * targhooks.c (default_shift_truncation_mask): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r253716
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r--gcc/fwprop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index ca99749..b77006b 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -357,8 +357,8 @@ canonicalize_address (rtx x)
{
case ASHIFT:
if (CONST_INT_P (XEXP (x, 1))
- && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (GET_MODE (x))
- && INTVAL (XEXP (x, 1)) >= 0)
+ && INTVAL (XEXP (x, 1)) < GET_MODE_UNIT_BITSIZE (GET_MODE (x))
+ && INTVAL (XEXP (x, 1)) >= 0)
{
HOST_WIDE_INT shift = INTVAL (XEXP (x, 1));
PUT_CODE (x, MULT);