diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11f9e0e56a1..369972e2c15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-05 Robin Dapp + + * config/s390/s390.c (s390_register_move_cost): Increase costs for + moves involving the CC reg. + 2018-11-05 Richard Biener PR tree-optimization/87873 diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 762c6bff07b..0f33101d779 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; }