From: Bernd Schmidt Date: Mon, 28 Jan 2013 20:03:26 +0000 (+0000) Subject: re PR other/54814 (ICE: unable to find a register to spill in class 'R0_REG') X-Git-Tag: releases/gcc-4.8.0~749 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51e44392b3084a2bb00aa185f42f538a61c7befe;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cab97ef5553d..917986be8ad3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-01-28 Bernd Schmidt + + 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 PR rtl-optimization/56117 diff --git a/gcc/reload.c b/gcc/reload.c index fb1021cda453..889a6ccb3e15 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -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. - 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 which we would eventually like to obtain the object. */ @@ -727,10 +727,12 @@ find_valid_class_1 (enum machine_mode outer ATTRIBUTE_UNUSED, { int bad = 0; 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)) - bad = 1; - + { + if (in_hard_reg_set_p (reg_class_contents[rclass], mode, regno) + && !HARD_REGNO_MODE_OK (regno, mode)) + bad = 1; + } + if (bad) continue;