diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-07-06 23:56:28 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-07-06 23:56:28 +0000 |
commit | d58c1a38e5c0ce489f788694a079433dc4b2be61 (patch) | |
tree | d99807e2dbeb0883a50f58e795079c5ca73dd4dc /gcc/combine.c | |
parent | 5511bc5ada2bd2bc9ab835d0ed9fd96a83d3260d (diff) | |
download | gcc-d58c1a38e5c0ce489f788694a079433dc4b2be61.zip gcc-d58c1a38e5c0ce489f788694a079433dc4b2be61.tar.gz gcc-d58c1a38e5c0ce489f788694a079433dc4b2be61.tar.bz2 |
revert: simplify-rtx.c (simplify_const_binary_operation): Use the shift_truncation_mask hook instead of performing modulo by width.
Revert:
* simplify-rtx.c (simplify_const_binary_operation): Use the
shift_truncation_mask hook instead of performing modulo by
width. Compare against mode precision, not bitsize.
* combine.c (combine_simplify_rtx, simplify_shift_const_1):
Use shift_truncation_mask instead of constructing the value
manually.
From-SVN: r175949
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 787b0db..4dbf022 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5939,7 +5939,9 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest, else if (SHIFT_COUNT_TRUNCATED && !REG_P (XEXP (x, 1))) SUBST (XEXP (x, 1), force_to_mode (XEXP (x, 1), GET_MODE (XEXP (x, 1)), - targetm.shift_truncation_mask (GET_MODE (x)), + ((unsigned HOST_WIDE_INT) 1 + << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x)))) + - 1, 0)); break; @@ -9875,7 +9877,7 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode, want to do this inside the loop as it makes it more difficult to combine shifts. */ if (SHIFT_COUNT_TRUNCATED) - orig_count &= targetm.shift_truncation_mask (mode); + orig_count &= GET_MODE_BITSIZE (mode) - 1; /* If we were given an invalid count, don't do anything except exactly what was requested. */ |