aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2006-04-03 18:12:15 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2006-04-03 18:12:15 +0000
commit2332d585583c1fd02f11346fcbd466b1c60d4501 (patch)
tree021ce578c76b004900ccfc68b913f823be3d27d9 /gcc/simplify-rtx.c
parentcbc75e6222900e5247774843699eea0c41c41cc8 (diff)
downloadgcc-2332d585583c1fd02f11346fcbd466b1c60d4501.zip
gcc-2332d585583c1fd02f11346fcbd466b1c60d4501.tar.gz
gcc-2332d585583c1fd02f11346fcbd466b1c60d4501.tar.bz2
simplify-rtx.c (simplify_unary_operation_1): When trying to remove TRUNCATE check if all bits outside the new mode are...
* simplify-rtx.c (simplify_unary_operation_1) <TRUNCATE>: When trying to remove TRUNCATE check if all bits outside the new mode are identical to the sign bit. From-SVN: r112643
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index cac77ad..0ce033d 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -656,7 +656,8 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
if ((TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (GET_MODE (op)))
? (num_sign_bit_copies (op, GET_MODE (op))
- >= (unsigned int) (GET_MODE_BITSIZE (mode) + 1))
+ > (unsigned int) (GET_MODE_BITSIZE (GET_MODE (op))
+ - GET_MODE_BITSIZE (mode)))
: truncated_to_mode (mode, op))
&& ! (GET_CODE (op) == LSHIFTRT
&& GET_CODE (XEXP (op, 0)) == MULT))