summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-19 07:08:49 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-19 07:08:49 +0000
commit6a2987418e79962d2dcc49064e70a848b19f5f05 (patch)
tree3d5e0a4f3edc366a0770e5779bd3c7fddedfd8c8 /gcc/recog.c
parentd27fe72bf6cec6dcc04b86d1527b7eb2fcbefd3d (diff)
downloadgcc-6a2987418e79962d2dcc49064e70a848b19f5f05.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223336 138bc75d-0d04-0410-961f-82ee72b054a4
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 d933364f57b..ffbd7b5c560 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;
}