diff options
Diffstat (limited to 'gcc/sched.c')
-rw-r--r-- | gcc/sched.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/sched.c b/gcc/sched.c index b539569dfb6..a44002e12a7 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -2343,12 +2343,7 @@ attach_deaths (x, insn, set_p) #endif && regno != STACK_POINTER_REGNUM) { - /* ??? It is perhaps a dead_or_set_p bug that it does - not check for REG_UNUSED notes itself. This is necessary - for the case where the SET_DEST is a subreg of regno, as - dead_or_set_p handles subregs specially. */ - if (! all_needed && ! dead_or_set_p (insn, x) - && ! find_reg_note (insn, REG_UNUSED, x)) + if (! all_needed && ! dead_or_set_p (insn, x)) { /* Check for the case where the register dying partially overlaps the register set by this insn. */ @@ -2406,17 +2401,20 @@ attach_deaths (x, insn, set_p) return; case SUBREG: + attach_deaths (SUBREG_REG (x), insn, + set_p && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) + <= UNITS_PER_WORD) + || (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) + == GET_MODE_SIZE (GET_MODE ((x)))))); + return; + case STRICT_LOW_PART: - /* These two cases preserve the value of SET_P, so handle them - separately. */ - attach_deaths (XEXP (x, 0), insn, set_p); + attach_deaths (XEXP (x, 0), insn, 0); return; case ZERO_EXTRACT: case SIGN_EXTRACT: - /* This case preserves the value of SET_P for the first operand, but - clears it for the other two. */ - attach_deaths (XEXP (x, 0), insn, set_p); + attach_deaths (XEXP (x, 0), insn, 0); attach_deaths (XEXP (x, 1), insn, 0); attach_deaths (XEXP (x, 2), insn, 0); return; |