[Bug rtl-optimization/70961] Regrename ignores preferred_rename_class
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 5 21:45:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70961
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The super_class has nothing to do with the class that is searched for
> renaming registers though, it's just the info passed to the back-end to
> compute this class. For example, on the ARM, the preferred_class will be
> LO_REGS for any chain of GENERAL_REGS.
As a matter of fact, that might not be true, something like
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c (revision 235858)
+++ config/arm/arm.c (working copy)
@@ -27721,9 +27721,9 @@ static reg_class_t
arm_preferred_rename_class (reg_class_t rclass)
{
/* Thumb-2 instructions using LO_REGS may be smaller than instructions
- using GENERIC_REGS. During register rename pass, we prefer LO_REGS,
+ using GENERAL_REGS. During register rename pass, we prefer LO_REGS,
and code size can be reduced. */
- if (TARGET_THUMB2 && rclass == GENERAL_REGS)
+ if (TARGET_THUMB2 && reg_class_subset_p (rclass, GENERAL_REGS))
return LO_REGS;
else
return NO_REGS;
could be needed.
More information about the Gcc-bugs
mailing list