diff options
author | Jan Hubicka <jh@suse.cz> | 2001-05-17 23:21:21 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-05-17 21:21:21 +0000 |
commit | e5c56fd9bf8418ff01126783bcd984fb151b21a2 (patch) | |
tree | 6be18b336d723f66b33f5327a8908ec4da42a48e /gcc/integrate.c | |
parent | 949c5d62571446e982b85c6190af0a172d645356 (diff) | |
download | gcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.zip gcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.tar.gz gcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.tar.bz2 |
integrate.c (copy_rtx_and_substitute): Use simplify_gen_subreg.
* integrate.c (copy_rtx_and_substitute): Use simplify_gen_subreg.
(simplify_subreg): Handle complex types represented as CONCAT.
* recog.c (validate_replace_rtx_1): Properly canonicalize expression
* rtl.h (swap_commutative_operands_p): Declare.
* rtlanal.c (swap_commutative_operands_p): New.
(operand_preference): New static function.
* combine.c (combine_simplify_rtx): Use swap_commutative_operands_p.
(gen_binary): Likewise.
* optabs.c (emit_cmp_and_jump_insns, emit_conditional_move): Likewise.
* simplify-rtx.c (simplify_gen_binary,
simplify_gen_relational): Likewise.
From-SVN: r42224
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 6795d82..29acaf2 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1902,35 +1902,9 @@ copy_rtx_and_substitute (orig, map, for_lhs) case SUBREG: copy = copy_rtx_and_substitute (SUBREG_REG (orig), map, for_lhs); - /* SUBREG is ordinary, but don't make nested SUBREGs. */ - if (GET_CODE (copy) == SUBREG) - { - int final_offset = SUBREG_BYTE (orig) + SUBREG_BYTE (copy); - - /* When working with SUBREGs the rule is that the byte - offset must be a multiple of the SUBREG's mode. */ - final_offset = (final_offset / GET_MODE_SIZE (GET_MODE (orig))); - final_offset = (final_offset * GET_MODE_SIZE (GET_MODE (orig))); - return gen_rtx_SUBREG (GET_MODE (orig), SUBREG_REG (copy), - final_offset); - } - else if (GET_CODE (copy) == CONCAT) - { - rtx retval = subreg_realpart_p (orig) ? XEXP (copy, 0) : XEXP (copy, 1); - int final_offset; - - if (GET_MODE (retval) == GET_MODE (orig)) - return retval; - - final_offset = SUBREG_BYTE (orig) % - GET_MODE_UNIT_SIZE (GET_MODE (SUBREG_REG (orig))); - final_offset = (final_offset / GET_MODE_SIZE (GET_MODE (orig))); - final_offset = (final_offset * GET_MODE_SIZE (GET_MODE (orig))); - return gen_rtx_SUBREG (GET_MODE (orig), retval, final_offset); - } - else - return gen_rtx_SUBREG (GET_MODE (orig), copy, - SUBREG_BYTE (orig)); + return simplify_gen_subreg (GET_MODE (orig), copy, + GET_MODE (SUBREG_REG (orig)), + SUBREG_BYTE (orig)); case ADDRESSOF: copy = gen_rtx_ADDRESSOF (mode, |