https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70961

            Bug ID: 70961
           Summary: Regrename ignores preferred_rename_class
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wdijkstr at arm dot com
  Target Milestone: ---

When deciding which register to use regrename.c calls the target function
preferred_rename_class. However in pass 2 in find_rename_reg it then just
ignores this preference. This results in significantly increased codesize on
targets which prefer a subset of allocatable registers in order to use smaller
instructions.

Also the computed super_class appears to be the union of all uses and defs
instead of the intersection. This should be the intersection as that is the set
of registers that all uses and defs support. 

If the preferred class doesn't result in a valid rename then it could search a
wider class, but then it would need to check that the size of the newly
selected patterns does not increase.

Reply via email to