aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.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/dse.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/dse.c')
-rw-r--r--gcc/dse.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 4c9b6ed..478984c 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -855,7 +855,6 @@ note_add_store (rtx loc, const_rtx expr ATTRIBUTE_UNUSED, void *data)
{
rtx_insn *insn;
note_add_store_info *info = (note_add_store_info *) data;
- int r, n;
if (!REG_P (loc))
return;
@@ -874,15 +873,14 @@ note_add_store (rtx loc, const_rtx expr ATTRIBUTE_UNUSED, void *data)
available, fail now. */
if (!info->fixed_regs_live)
{
- info->failure = true;
+ info->failure = true;
return;
}
/* Now check if this is a live fixed register. */
- r = REGNO (loc);
- n = hard_regno_nregs[r][GET_MODE (loc)];
- while (--n >= 0)
- if (REGNO_REG_SET_P (info->fixed_regs_live, r+n))
- info->failure = true;
+ unsigned int end_regno = END_REGNO (loc);
+ for (unsigned int regno = REGNO (loc); regno < end_regno; ++regno)
+ if (REGNO_REG_SET_P (info->fixed_regs_live, regno))
+ info->failure = true;
}
/* Callback for for_each_inc_dec that emits an INSN that sets DEST to