diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-06 23:56:28 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-06 23:56:28 +0000 |
commit | b3003238b9afd59336643098e278a06860af126b (patch) | |
tree | d99807e2dbeb0883a50f58e795079c5ca73dd4dc /gcc/simplify-rtx.c | |
parent | ded805e6c3cca686d517a87123a42b986baeae9a (diff) | |
download | gcc-b3003238b9afd59336643098e278a06860af126b.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175949 138bc75d-0d04-0410-961f-82ee72b054a4
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 5a98b69abbc..82b818b02f1 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 |