diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-17 18:12:05 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-17 18:12:05 -0400 |
commit | c0d3ac4db65a7c4ada6f1e63f51311cfa04d309b (patch) | |
tree | bcdb3cd9fe29f6784bc9b7edd67d0cc512a31be9 /gcc | |
parent | 10670d47c659d4280d459ebd0231f2395e29505f (diff) | |
download | gcc-c0d3ac4db65a7c4ada6f1e63f51311cfa04d309b.zip gcc-c0d3ac4db65a7c4ada6f1e63f51311cfa04d309b.tar.gz gcc-c0d3ac4db65a7c4ada6f1e63f51311cfa04d309b.tar.bz2 |
(simplify_set): Use rtx_equal_p to compare cc_use and its setter.
(make_extraction): Don't put a subreg around a register if it is already in
the correct mode.
From-SVN: r7322
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/combine.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index c9a0b3b..a800a27 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4210,7 +4210,7 @@ simplify_set (x) && (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0 && (undobuf.other_insn == 0 || other_insn == undobuf.other_insn) && GET_RTX_CLASS (GET_CODE (*cc_use)) == '<' - && XEXP (*cc_use, 0) == dest) + && rtx_equal_p (XEXP (*cc_use, 0), dest)) { enum rtx_code old_code = GET_CODE (*cc_use); enum rtx_code new_code; @@ -5071,14 +5071,20 @@ make_extraction (mode, inner, pos, pos_rtx, len, MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (inner); } else if (GET_CODE (inner) == REG) - /* We can't call gen_lowpart_for_combine here since we always want - a SUBREG and it would sometimes return a new hard register. */ - new = gen_rtx (SUBREG, tmode, inner, - (WORDS_BIG_ENDIAN - && GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD - ? ((GET_MODE_SIZE (inner_mode) - GET_MODE_SIZE (tmode)) - / UNITS_PER_WORD) - : 0)); + { + /* We can't call gen_lowpart_for_combine here since we always want + a SUBREG and it would sometimes return a new hard register. */ + if (tmode != inner_mode) + new = gen_rtx (SUBREG, tmode, inner, + (WORDS_BIG_ENDIAN + && GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD + ? ((GET_MODE_SIZE (inner_mode) + - GET_MODE_SIZE (tmode)) + / UNITS_PER_WORD) + : 0)); + else + new = inner; + } else new = force_to_mode (inner, tmode, len >= HOST_BITS_PER_WIDE_INT |