Message ID | 8760rqi5d1.fsf@atmel.com |
---|---|
State | New |
Headers | show |
On 07/28/2016 09:33 AM, Senthil Kumar Selvaraj wrote: > > Is there a reason why only REG and SYMBOL_REFs get valid > subreg_in_class? I tried extending it handle constants and PLUS > expressions, and it fixes PR 71873. It also fixes a another > bug that was a work around for the reload failure (PR 64452) - that > had a plus expression instead of the const. > > Reg testing on avr and x86_64 did not show any new failures. Is this > the right way to fix this? I think it looks quite plausible. Note that testing x86_64 on trunk will not do anything - it is no longer using reload. Could you go back to an older branch (4.7 I think is the last one using reload) and retest x86_64 with that, for better test coverage? Bernd
diff --git gcc/reload.c gcc/reload.c index 06426d9..f80d849 100644 --- gcc/reload.c +++ gcc/reload.c @@ -1141,7 +1141,9 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, SUBREG_BYTE (in), GET_MODE (in)), REGNO (SUBREG_REG (in))); - else if (GET_CODE (SUBREG_REG (in)) == SYMBOL_REF) + else if (GET_CODE (SUBREG_REG (in)) == SYMBOL_REF + || CONSTANT_P (SUBREG_REG (in)) + || GET_CODE (SUBREG_REG (in)) == PLUS) subreg_in_class = find_valid_class_1 (inmode, GET_MODE (SUBREG_REG (in)), rclass);