diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-12-17 06:45:16 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-12-17 06:45:16 -0500 |
commit | 393de53f612cdae21b53be55d42b40c674b23252 (patch) | |
tree | 46b1138c15e18f6f348332bc62fbd67ec0cd5827 /gcc | |
parent | 4bcdd4d0b29c8053d86b78d802eba6750a5840d8 (diff) | |
download | gcc-393de53f612cdae21b53be55d42b40c674b23252.zip gcc-393de53f612cdae21b53be55d42b40c674b23252.tar.gz gcc-393de53f612cdae21b53be55d42b40c674b23252.tar.bz2 |
(try_combine): When checking for two sets of the same register in a split insn...
(try_combine): When checking for two sets of the same register in a
split insn, also test for setting a ZERO_EXTRACT, STRICT_LOW_PART, or
SUBREG.
From-SVN: r10783
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/combine.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index df8c732..f861921 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1809,10 +1809,21 @@ try_combine (i3, i2, i1) /* It is possible that both insns now set the destination of I3. If so, we must show an extra use of it. */ - if (insn_code_number >= 0 && GET_CODE (SET_DEST (i3set)) == REG - && GET_CODE (SET_DEST (i2set)) == REG - && REGNO (SET_DEST (i3set)) == REGNO (SET_DEST (i2set))) - reg_n_sets[REGNO (SET_DEST (i2set))]++; + if (insn_code_number >= 0) + { + rtx new_i3_dest = SET_DEST (i3set); + rtx new_i2_dest = SET_DEST (i2set); + + while (GET_CODE (new_i3_dest) == ZERO_EXTRACT + || GET_CODE (new_i3_dest) == STRICT_LOW_PART + || GET_CODE (new_i3_dest) == SUBREG) + new_i3_dest = XEXP (new_i3_dest, 0); + + if (GET_CODE (new_i3_dest) == REG + && GET_CODE (new_i2_dest) == REG + && REGNO (new_i3_dest) == REGNO (new_i2_dest)) + reg_n_sets[REGNO (SET_DEST (i2set))]++; + } } /* If we can split it and use I2DEST, go ahead and see if that |