Commit f742cf90 by H.J. Lu Committed by H.J. Lu

Check if mode is OK first

	PR rtl-optimization/60024
	* sel-sched.c (init_regs_for_mode): Check if mode is OK first.

From-SVN: r207427
parent 8f36fd30
2014-02-03 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/60024
* sel-sched.c (init_regs_for_mode): Check if mode is OK first.
2014-02-03 Markus Trippelsdorf <markus@trippelsdorf.de>
* doc/invoke.texi: (fprofile-reorder-functions): Fix typo.
......
......@@ -1116,9 +1116,16 @@ init_regs_for_mode (enum machine_mode mode)
for (cur_reg = 0; cur_reg < FIRST_PSEUDO_REGISTER; cur_reg++)
{
int nregs = hard_regno_nregs[cur_reg][mode];
int nregs;
int i;
/* See whether it accepts all modes that occur in
original insns. */
if (! HARD_REGNO_MODE_OK (cur_reg, mode))
continue;
nregs = hard_regno_nregs[cur_reg][mode];
for (i = nregs - 1; i >= 0; --i)
if (fixed_regs[cur_reg + i]
|| global_regs[cur_reg + i]
......@@ -1140,11 +1147,6 @@ init_regs_for_mode (enum machine_mode mode)
if (i >= 0)
continue;
/* See whether it accepts all modes that occur in
original insns. */
if (! HARD_REGNO_MODE_OK (cur_reg, mode))
continue;
if (HARD_REGNO_CALL_PART_CLOBBERED (cur_reg, mode))
SET_HARD_REG_BIT (sel_hrd.regs_for_call_clobbered[mode],
cur_reg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment