Commit 51e44392 by Bernd Schmidt Committed by Georg-Johann Lay

re PR other/54814 (ICE: unable to find a register to spill in class 'R0_REG')

	PR other/54814
	* reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of
	TEST_HARD_REG_BIT.

From-SVN: r195515
parent db1fb332
2013-01-28 Bernd Schmidt <bernds@codesourcery.com>
PR other/54814
* reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of
TEST_HARD_REG_BIT.
2013-01-28 Jakub Jelinek <jakub@redhat.com> 2013-01-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/56117 PR rtl-optimization/56117
......
...@@ -707,7 +707,7 @@ find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED, ...@@ -707,7 +707,7 @@ find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED,
} }
/* We are trying to reload a subreg of something that is not a register. /* We are trying to reload a subreg of something that is not a register.
Find the largest class which has at least one register valid in Find the largest class which contains only registers valid in
mode MODE. OUTER is the mode of the subreg, DEST_CLASS the class in mode MODE. OUTER is the mode of the subreg, DEST_CLASS the class in
which we would eventually like to obtain the object. */ which we would eventually like to obtain the object. */
...@@ -727,10 +727,12 @@ find_valid_class_1 (enum machine_mode outer ATTRIBUTE_UNUSED, ...@@ -727,10 +727,12 @@ find_valid_class_1 (enum machine_mode outer ATTRIBUTE_UNUSED,
{ {
int bad = 0; int bad = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER && !bad; regno++) for (regno = 0; regno < FIRST_PSEUDO_REGISTER && !bad; regno++)
if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno) {
&& !HARD_REGNO_MODE_OK (regno, mode)) if (in_hard_reg_set_p (reg_class_contents[rclass], mode, regno)
bad = 1; && !HARD_REGNO_MODE_OK (regno, mode))
bad = 1;
}
if (bad) if (bad)
continue; continue;
......
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