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/simplify-rtx.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/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5a98b69..82b818b 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3768,8 +3768,8 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode, shift_truncation_mask, since the shift might not be part of an ashlM3, lshrM3 or ashrM3 instruction. */ if (SHIFT_COUNT_TRUNCATED) - arg1 &= targetm.shift_truncation_mask (mode); - else if (arg1 < 0 || arg1 >= GET_MODE_PRECISION (mode)) + arg1 = (unsigned HOST_WIDE_INT) arg1 % width; + else if (arg1 < 0 || arg1 >= GET_MODE_BITSIZE (mode)) return 0; val = (code == ASHIFT |