diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-11-11 23:24:05 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-11-11 23:24:05 +0000 |
commit | 1300342b4520747b7d92af3cf07b0e96267ed100 (patch) | |
tree | 38ac169b3596562fdc6d9f6cf21db58786279300 /gcc | |
parent | 2f1e2391d8d60d887cfffe7d7b619ea2eff82f66 (diff) | |
download | gcc-1300342b4520747b7d92af3cf07b0e96267ed100.zip gcc-1300342b4520747b7d92af3cf07b0e96267ed100.tar.gz gcc-1300342b4520747b7d92af3cf07b0e96267ed100.tar.bz2 |
cse.c (fold_rtx): Remove redundant gen_rtx_CONST.
gcc/
* cse.c (fold_rtx): Remove redundant gen_rtx_CONST.
From-SVN: r141775
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cse.c | 18 |
2 files changed, 4 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fee1bb..755b33b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2008-11-11 Richard Sandiford <rdsandiford@googlemail.com> + * cse.c (fold_rtx): Remove redundant gen_rtx_CONST. + +2008-11-11 Richard Sandiford <rdsandiford@googlemail.com> + PR rtl-optimization/37363 * simplify-rtx.c (simplify_plus_minus): Don't create (const (minus ...)) expresisons. @@ -3171,33 +3171,15 @@ fold_rtx (rtx x, rtx insn) { case RTX_UNARY: { - int is_const = 0; - /* We can't simplify extension ops unless we know the original mode. */ if ((code == ZERO_EXTEND || code == SIGN_EXTEND) && mode_arg0 == VOIDmode) break; - /* If we had a CONST, strip it off and put it back later if we - fold. */ - if (const_arg0 != 0 && GET_CODE (const_arg0) == CONST) - is_const = 1, const_arg0 = XEXP (const_arg0, 0); - new_rtx = simplify_unary_operation (code, mode, const_arg0 ? const_arg0 : folded_arg0, mode_arg0); - /* NEG of PLUS could be converted into MINUS, but that causes - expressions of the form - (CONST (MINUS (CONST_INT) (SYMBOL_REF))) - which many ports mistakenly treat as LEGITIMATE_CONSTANT_P. - FIXME: those ports should be fixed. */ - if (new_rtx != 0 && is_const - && GET_CODE (new_rtx) == PLUS - && (GET_CODE (XEXP (new_rtx, 0)) == SYMBOL_REF - || GET_CODE (XEXP (new_rtx, 0)) == LABEL_REF) - && GET_CODE (XEXP (new_rtx, 1)) == CONST_INT) - new_rtx = gen_rtx_CONST (mode, new_rtx); } break; |