Commit aafc759a by Pat Haugen Committed by Pat Haugen

rs6000.c (rs6000_register_move_cost): Increase cost of LR/CTR moves for Power6.

	* config/rs6000/rs6000.c (rs6000_register_move_cost): Increase cost
	of LR/CTR moves for Power6.

From-SVN: r134565
parent 28f68625
2008-04-22 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_register_move_cost): Increase cost
of LR/CTR moves for Power6.
2008-04-22 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/36003
......
......@@ -21331,6 +21331,12 @@ rs6000_register_move_cost (enum machine_mode mode,
else if (from == CR_REGS)
return 4;
/* Power6 has slower LR/CTR moves so make them more expensive than
memory in order to bias spills to memory .*/
else if (rs6000_cpu == PROCESSOR_POWER6
&& reg_classes_intersect_p (from, LINK_OR_CTR_REGS))
return 6 * hard_regno_nregs[0][mode];
else
/* A move will cost one instruction per GPR moved. */
return 2 * hard_regno_nregs[0][mode];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment