Commit 1a4ec325 by Kwok Cheung Yeung Committed by Kwok Cheung Yeung

Check suitability of spill register for mode

2019-11-14  Kwok Cheung Yeung  <kcy@codesourcery.com>

	gcc/
	* lra-spills.c (assign_spill_hard_regs): Check that the spill
	register is suitable for the mode.

From-SVN: r278267
parent f674b4a7
2019-11-14 Kwok Cheung Yeung <kcy@codesourcery.com>
* lra-spills.c (assign_spill_hard_regs): Check that the spill
register is suitable for the mode.
2019-11-14 Andrew MacLeod <amacleod@redhat.com> 2019-11-14 Andrew MacLeod <amacleod@redhat.com>
* range-op.h (range_operator::fold_range): Return a bool. * range-op.h (range_operator::fold_range): Return a bool.
...@@ -283,7 +283,8 @@ assign_spill_hard_regs (int *pseudo_regnos, int n) ...@@ -283,7 +283,8 @@ assign_spill_hard_regs (int *pseudo_regnos, int n)
for (k = 0; k < spill_class_size; k++) for (k = 0; k < spill_class_size; k++)
{ {
hard_regno = ira_class_hard_regs[spill_class][k]; hard_regno = ira_class_hard_regs[spill_class][k];
if (TEST_HARD_REG_BIT (eliminable_regset, hard_regno)) if (TEST_HARD_REG_BIT (eliminable_regset, hard_regno)
|| !targetm.hard_regno_mode_ok (hard_regno, mode))
continue; continue;
if (! overlaps_hard_reg_set_p (conflict_hard_regs, mode, hard_regno)) if (! overlaps_hard_reg_set_p (conflict_hard_regs, mode, hard_regno))
break; break;
......
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