Commit c0d3ac4d by Richard Kenner

(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
parent 10670d47
...@@ -4210,7 +4210,7 @@ simplify_set (x) ...@@ -4210,7 +4210,7 @@ simplify_set (x)
&& (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0 && (cc_use = find_single_use (dest, subst_insn, &other_insn)) != 0
&& (undobuf.other_insn == 0 || other_insn == undobuf.other_insn) && (undobuf.other_insn == 0 || other_insn == undobuf.other_insn)
&& GET_RTX_CLASS (GET_CODE (*cc_use)) == '<' && 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 old_code = GET_CODE (*cc_use);
enum rtx_code new_code; enum rtx_code new_code;
...@@ -5071,14 +5071,20 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -5071,14 +5071,20 @@ make_extraction (mode, inner, pos, pos_rtx, len,
MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (inner); MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (inner);
} }
else if (GET_CODE (inner) == REG) 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. */ /* We can't call gen_lowpart_for_combine here since we always want
new = gen_rtx (SUBREG, tmode, inner, a SUBREG and it would sometimes return a new hard register. */
(WORDS_BIG_ENDIAN if (tmode != inner_mode)
&& GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD new = gen_rtx (SUBREG, tmode, inner,
? ((GET_MODE_SIZE (inner_mode) - GET_MODE_SIZE (tmode)) (WORDS_BIG_ENDIAN
/ UNITS_PER_WORD) && GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD
: 0)); ? ((GET_MODE_SIZE (inner_mode)
- GET_MODE_SIZE (tmode))
/ UNITS_PER_WORD)
: 0));
else
new = inner;
}
else else
new = force_to_mode (inner, tmode, new = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT len >= HOST_BITS_PER_WIDE_INT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment