rs6000.c (rs6000_register_move_cost): Make LR/CTR moves expensive on Power7 also.
authorPat Haugen <pthaugen@us.ibm.com>
Thu, 26 May 2011 15:09:31 +0000 (15:09 +0000)
committerPat Haugen <pthaugen@gcc.gnu.org>
Thu, 26 May 2011 15:09:31 +0000 (15:09 +0000)
        * config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR
        moves expensive on Power7 also.

From-SVN: r174292

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 2b8478e848079322ac32572c7d4880ccf2ffa9ab..e72b14439e0c5e51e2696cd47fcfff77a1e0394f 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-26  Pat Haugen <pthaugen@us.ibm.com>
+
+       * config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR
+       moves expensive on Power7 also.
+
 2011-05-26  Richard Guenther  <rguenther@suse.de>
 
        * fold-const.c (fold_unary_loc): Remove bogus code.
index 48f387e98b6c5a81355f31456d66e052c1171b69..d6a12fdbe09efc69f259be33c0322af16d1eabdb 100644 (file)
@@ -26444,9 +26444,10 @@ rs6000_register_move_cost (enum machine_mode mode,
       else if (from == CR_REGS)
        ret = 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
+      /* For those processors that have slow LR/CTR moves, make them more
+         expensive than memory in order to bias spills to memory .*/
+      else if ((rs6000_cpu == PROCESSOR_POWER6
+               || rs6000_cpu == PROCESSOR_POWER7)
               && reg_classes_intersect_p (from, LINK_OR_CTR_REGS))
         ret = 6 * hard_regno_nregs[0][mode];