From: Adam Nemet Date: Mon, 3 Apr 2006 18:12:15 +0000 (+0000) Subject: simplify-rtx.c (simplify_unary_operation_1): When trying to remove TRUNCATE check... X-Git-Tag: releases/gcc-4.2.0~3438 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2332d585583c1fd02f11346fcbd466b1c60d4501;p=thirdparty%2Fgcc.git 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) : When trying to remove TRUNCATE check if all bits outside the new mode are identical to the sign bit. From-SVN: r112643 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b264035e7c7a..d15763234bee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-04-03 Adam Nemet + + * simplify-rtx.c (simplify_unary_operation_1) : When + trying to remove TRUNCATE check if all bits outside the new mode + are identical to the sign bit. + 2006-04-03 Jeff Law * tree-ssa-dom.c (propagate_rhs_into_lhs): Avoid useless folding diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index cac77ad1fce0..0ce033df208a 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))