diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2010-07-27 09:34:51 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2010-07-27 09:34:51 +0000 |
commit | 2b0cb007fa96ea4ea95de5505cfe481b2aedcf80 (patch) | |
tree | 2bc0c7ba98b274d17347753a77a6e5a17643aec0 /gcc/reload1.c | |
parent | fb55ca75aed99996a52ea22ba5456c918e7e70c6 (diff) | |
download | gcc-2b0cb007fa96ea4ea95de5505cfe481b2aedcf80.zip gcc-2b0cb007fa96ea4ea95de5505cfe481b2aedcf80.tar.gz gcc-2b0cb007fa96ea4ea95de5505cfe481b2aedcf80.tar.bz2 |
re PR rtl-optimization/45051 (gcc.c-torture/execute/builtins/abs-2.c and abs-3.c due to "track subwords of DImode allocnos")
PR rtl-optimization/45051
* reload1.c (delete_output_reload): Use refers_to_regno_p rather
than reg_mentioned_p.
From-SVN: r162558
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 437b8c2..5c49f3c 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -8813,6 +8813,8 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg) int n_inherited = 0; rtx i1; rtx substed; + unsigned regno; + int nregs; /* It is possible that this reload has been only used to set another reload we eliminated earlier and thus deleted this instruction too. */ @@ -8864,6 +8866,12 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg) if (n_occurrences > n_inherited) return; + regno = REGNO (reg); + if (regno >= FIRST_PSEUDO_REGISTER) + nregs = 1; + else + nregs = hard_regno_nregs[regno][GET_MODE (reg)]; + /* If the pseudo-reg we are reloading is no longer referenced anywhere between the store into it and here, and we're within the same basic block, then the value can only @@ -8875,7 +8883,7 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg) if (NOTE_INSN_BASIC_BLOCK_P (i1)) return; if ((NONJUMP_INSN_P (i1) || CALL_P (i1)) - && reg_mentioned_p (reg, PATTERN (i1))) + && refers_to_regno_p (regno, regno + nregs, PATTERN (i1), NULL)) { /* If this is USE in front of INSN, we only have to check that there are no more references than accounted for by inheritance. */ |