aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-19 07:08:49 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-05-19 07:08:49 +0000
commit53d1bae90176e1e1a605149d6bdfb9c455888289 (patch)
tree3d5e0a4f3edc366a0770e5779bd3c7fddedfd8c8 /gcc/recog.c
parent8a480dc3d0d950b6e0a1134897b0dffc26c393e4 (diff)
downloadgcc-53d1bae90176e1e1a605149d6bdfb9c455888289.zip
gcc-53d1bae90176e1e1a605149d6bdfb9c455888289.tar.gz
gcc-53d1bae90176e1e1a605149d6bdfb9c455888289.tar.bz2
cfgcleanup.c (mentions_nonequal_regs): Use END_REGNO.
gcc/ * cfgcleanup.c (mentions_nonequal_regs): Use END_REGNO. * dse.c (note_add_store): Likewise. * ira-lives.c (mark_hard_reg_dead): Likewise. * loop-invariant.c (mark_reg_store): Likewise. (mark_reg_death): Likewise. * postreload.c (reload_combine): Likewise. (reload_combine_note_store): Likewise. (reload_combine_note_use): Likewise. * recog.c (peep2_reg_dead_p): Likewise. From-SVN: r223336
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index d933364..ffbd7b5 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3128,18 +3128,15 @@ peep2_regno_dead_p (int ofs, int regno)
int
peep2_reg_dead_p (int ofs, rtx reg)
{
- int regno, n;
-
gcc_assert (ofs < MAX_INSNS_PER_PEEP2 + 1);
ofs = peep2_buf_position (peep2_current + ofs);
gcc_assert (peep2_insn_data[ofs].insn != NULL_RTX);
- regno = REGNO (reg);
- n = hard_regno_nregs[regno][GET_MODE (reg)];
- while (--n >= 0)
- if (REGNO_REG_SET_P (peep2_insn_data[ofs].live_before, regno + n))
+ unsigned int end_regno = END_REGNO (reg);
+ for (unsigned int regno = REGNO (reg); regno < end_regno; ++regno)
+ if (REGNO_REG_SET_P (peep2_insn_data[ofs].live_before, regno))
return 0;
return 1;
}