Skip to content

Commit

Permalink
S/390: Increase register move costs for CC_REGS
Browse files Browse the repository at this point in the history
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  <[email protected]>

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

From-SVN: r265814
  • Loading branch information
rdapp-ibm authored and Robin Dapp committed Nov 5, 2018
1 parent d64d068 commit b14dfa9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-11-05 Robin Dapp <[email protected]>

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

2018-11-05 Richard Biener <[email protected]>

PR tree-optimization/87873
Expand Down
5 changes: 5 additions & 0 deletions gcc/config/s390/s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b14dfa9

Please sign in to comment.