]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
S/390: Increase register move costs for CC_REGS
authorRobin Dapp <rdapp@linux.ibm.com>
Mon, 5 Nov 2018 16:42:43 +0000 (16:42 +0000)
committerRobin Dapp <rdapp@gcc.gnu.org>
Mon, 5 Nov 2018 16:42:43 +0000 (16:42 +0000)
This increases the move costs for moves involving the CC
register which saves us some instructions in SPEC CPU2006.

gcc/ChangeLog:

2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>

* config/s390/s390.c (s390_register_move_cost): Increase costs for
        moves involving the CC reg.

From-SVN: r265814

gcc/ChangeLog
gcc/config/s390/s390.c

index 11f9e0e56a1329391d6048266f11f7e37b9da938..369972e2c15f762c79e2d1de908cb98187208b7f 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
+
+       * config/s390/s390.c (s390_register_move_cost): Increase costs for
+        moves involving the CC reg.
+
 2018-11-05  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/87873
index 762c6bff07ba22dac44604560f561169f6e20b4b..0f33101d779306affd835e89824d3b166bdf51bb 100644 (file)
@@ -3416,6 +3416,11 @@ s390_register_move_cost (machine_mode mode,
          && reg_classes_intersect_p (to, GENERAL_REGS)))
     return 10;
 
+  /* We usually do not want to copy via CC.  */
+  if (reg_classes_intersect_p (from, CC_REGS)
+       || reg_classes_intersect_p (to, CC_REGS))
+    return 5;
+
   return 1;
 }