diff options
author | Robin Dapp <rdapp@linux.ibm.com> | 2018-11-05 16:42:43 +0000 |
---|---|---|
committer | Robin Dapp <rdapp@gcc.gnu.org> | 2018-11-05 16:42:43 +0000 |
commit | b14dfa94a88298dec7d1c8f6f3cc491912e5541a (patch) | |
tree | f82ed42bf1b5f1e76213ba1305e6330e3a585144 | |
parent | d64d068c6ae391ccb1502dd3bed865fe57e9f4e4 (diff) | |
download | gcc-b14dfa94a88298dec7d1c8f6f3cc491912e5541a.zip gcc-b14dfa94a88298dec7d1c8f6f3cc491912e5541a.tar.gz gcc-b14dfa94a88298dec7d1c8f6f3cc491912e5541a.tar.bz2 |
S/390: Increase register move costs for CC_REGS
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11f9e0e..369972e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 762c6bf..0f33101 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -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; } |