IRA: Check that reg classes contain a hard reg of given mode in reg move cost calculation
IRA calculates wrong AVR costs for moving general hard regs of SFmode. To
calculate the costs we did not exclude sub-classes which do not contain
hard regs of given mode. This was the reason for spilling a pseudo in the
PR. The patch fixes this.
PR rtl-optimization/90706
gcc/ChangeLog:
* ira-costs.cc: Include print-rtl.h.
(record_reg_classes, scan_one_insn): Add code to print debug info.
* ira.cc (ira_init_register_move_cost): Check that at least one hard
reg of the mode are in the class contents to calculate the
register move costs.