diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-10-13 09:53:00 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-10-13 09:53:00 +0000 |
commit | 250a60f3879d2d508d0d08e9da1dfa1648e1a369 (patch) | |
tree | fc2db3da8cc97b1a2250ffa755f81ed79f7052be /gcc/cse.c | |
parent | fb98441af9c84caef6a0e3210ace4b8ffc7e3840 (diff) | |
download | gcc-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/cse.c')
-rw-r--r-- | gcc/cse.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3612,7 +3612,7 @@ fold_rtx (rtx x, rtx_insn *insn) { if (SHIFT_COUNT_TRUNCATED) canon_const_arg1 = GEN_INT (INTVAL (const_arg1) - & (GET_MODE_BITSIZE (mode) + & (GET_MODE_UNIT_BITSIZE (mode) - 1)); else break; @@ -3661,7 +3661,8 @@ fold_rtx (rtx x, rtx_insn *insn) { if (SHIFT_COUNT_TRUNCATED) inner_const = GEN_INT (INTVAL (inner_const) - & (GET_MODE_BITSIZE (mode) - 1)); + & (GET_MODE_UNIT_BITSIZE (mode) + - 1)); else break; } @@ -3691,7 +3692,7 @@ fold_rtx (rtx x, rtx_insn *insn) /* As an exception, we can turn an ASHIFTRT of this form into a shift of the number of bits - 1. */ if (code == ASHIFTRT) - new_const = GEN_INT (GET_MODE_BITSIZE (mode) - 1); + new_const = GEN_INT (GET_MODE_UNIT_BITSIZE (mode) - 1); else if (!side_effects_p (XEXP (y, 0))) return CONST0_RTX (mode); else |