From ee5332b81a9cd1dea4c73f596648ae70533f5fe5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 20 Jan 1999 18:21:28 -0800 Subject: cse.c (fold_rtx): Revert 29 Dec change. * cse.c (fold_rtx): Revert 29 Dec change. (cse_insn): Revert 12 Jan change. * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX. * regclass.c (reg_scan_mark_refs): Revert 29 Dec change. * rtl.def: Likewise. * rtl.h (CONSTANT_P): Likewise. * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX to memory. * recog.c (immediate_operand): Accept CONSTANT_P_RTX. * alpha.c (input_operand): Likewise. * c4x.c (const_operand): Likewise. * explow.c (allocate_dynamic_stack_space): Use register_operand instead of arith_operand, which does not exist. * 1750a.h: Fix comment closure. * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change. * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch. * arm.h (TARGET_SWITCHES): Fix typo. * i370.md (anon mult and div patterns): Fix set mode mismatch. * i860.c (output_delayed_branch): Fix operands to constrain_operands. (output_delay_insn): Likewise. * m88k.md (anon rotate insns): Fix set mode mismatch. (anon BLKmode moves): Commonize and fix set mode mismatches. * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch. * romp.md (movdf): Fix typo. From-SVN: r24796 --- gcc/cse.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'gcc/cse.c') diff --git a/gcc/cse.c b/gcc/cse.c index 761ebff..572d24f 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -4931,21 +4931,6 @@ fold_rtx (x, insn) switch (code) { case CONST: - /* If the operand is a CONSTANT_P_RTX, see if what's inside it - is known to be constant and replace the whole thing with a - CONST_INT of either zero or one. Note that this code assumes - that an insn that recognizes a CONST will also recognize a - CONST_INT, but that seems to be a safe assumption. */ - if (GET_CODE (XEXP (x, 0)) == CONSTANT_P_RTX) - { - x = equiv_constant (fold_rtx (XEXP (XEXP (x, 0), 0), 0)); - return (x != 0 && (GET_CODE (x) == CONST_INT - || GET_CODE (x) == CONST_DOUBLE) - ? const1_rtx : const0_rtx); - } - - /* ... fall through ... */ - case CONST_INT: case CONST_DOUBLE: case SYMBOL_REF: @@ -5865,6 +5850,12 @@ fold_rtx (x, insn) const_arg1 ? const_arg1 : folded_arg1, const_arg2 ? const_arg2 : XEXP (x, 2)); break; + + case 'x': + /* Always eliminate CONSTANT_P_RTX at this stage. */ + if (code == CONSTANT_P_RTX) + return (const_arg0 ? const1_rtx : const0_rtx); + break; } return new ? new : x; @@ -6864,12 +6855,6 @@ cse_insn (insn, libcall_insn) if (src == src_folded) src_folded = 0; - /* Folds of constant_p_rtx are to be preferred, since we do - not wish any to live past CSE. */ - if (src && GET_CODE (src) == CONST - && GET_CODE (XEXP (src, 0)) == CONSTANT_P_RTX) - src = 0; - /* At this point, ELT, if non-zero, points to a class of expressions equivalent to the source of this SET and SRC, SRC_EQV, SRC_FOLDED, and SRC_RELATED, if non-zero, each contain additional equivalent -- cgit v1.1