s390.h: Make BRANCH_COST an option.
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Thu, 26 Jan 2012 10:04:43 +0000 (10:04 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Thu, 26 Jan 2012 10:04:43 +0000 (10:04 +0000)
2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* config/s390/s390.h: Make BRANCH_COST an option.
* config/s390/s390.opt: New option -mbranch-cost.

2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
* gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
memory.
* gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
the default value for s390 and s390x.

From-SVN: r183555

gcc/ChangeLog
gcc/config/s390/s390.h
gcc/config/s390/s390.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr44194-1.c
gcc/testsuite/gcc.dg/pr46309.c
gcc/testsuite/gfortran.dg/reassoc_4.f

index 338e038553f3e26c73adf218fe9bdfb7afced221..e9b140e069a2035d07ec62e2e008db19054142f5 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * config/s390/s390.h: Make BRANCH_COST an option.
+       * config/s390/s390.opt: New option -mbranch-cost.
+
 2012-01-26  Richard Henderson  <rth@redhat.com>
 
        Revert 2012-01-24 change:
index afd22ad883b30efe1261b175ff0f063f9002f6ba..edc6399789e6d9e62efcaa659572b0cb123e03d1 100644 (file)
@@ -722,7 +722,7 @@ do {                                                                        \
 
 /* A C expression for the cost of a branch instruction.  A value of 1
    is the default; other values are interpreted relative to that.  */
-#define BRANCH_COST(speed_p, predictable_p) 1
+#define BRANCH_COST(speed_p, predictable_p) s390_branch_cost
 
 /* Nonzero if access to memory by bytes is slow and undesirable.  */
 #define SLOW_BYTE_ACCESS 1
index 6ce32dc9c9ed1e6da24a3108120e3a5613f1dada..51b395ee99d19a282f5eed070af2ca2dc4975dbf 100644 (file)
@@ -140,3 +140,9 @@ Warn if a single function's framesize exceeds the given framesize
 mzarch
 Target Report RejectNegative Negative(mesa) Mask(ZARCH)
 z/Architecture
+
+mbranch-cost=
+Target Report Joined RejectNegative UInteger Var(s390_branch_cost) Init(1)
+Set the branch costs for conditional branch instructions.  Reasonable
+values are small, non-negative integers.  The default branch cost is
+1.
index 60e392b3341467cb405d76cae74a481b1f0cf62d..0905ff1e5f705a1801e785a49f18a5ec8c100552 100644 (file)
@@ -1,3 +1,11 @@
+2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
+       * gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
+       memory.
+       * gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
+       the default value for s390 and s390x.
+
 2012-01-25  Aldy Hernandez  <aldyh@redhat.com>
 
        PR lto/51698
index cb6536356820bc0cfa90aeed71fb3c9fcb561dca..df042cd8d53867f12a18bc9eb855f6e0131c9959 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } } } */
+/* { dg-do compile { target { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } } } */
 /* { dg-options "-O2 -fdump-rtl-dse1" } */
 /* Restricting to 64-bit targets since 32-bit targets return
    structures in memory.  */
index f567afac75b577cd63e920a9c1959dd02e7f6805..68a344a1bdc2d169723dd604ff52adee8967fa33 100644 (file)
@@ -4,7 +4,7 @@
 /* The transformation depends on BRANCH_COST being greater than 1
    (see the notes in the PR), so try to force that.  */
 /* { dg-additional-options "-mtune=octeon2" { target mips*-*-* } } */
-/* { dg-additional-options "-mbranch-cost=2" { target avr*-*-* } } */
+/* { dg-additional-options "-mbranch-cost=2" { target avr*-*-* s390*-*-* } } */
 
 int
 f1 (int a)
index 1bcdf1893d3a2374a4a2811573ff6f3fdb9f80f8..8ed7e19f79346f767c5287dab7beac7408c792a3 100644 (file)
@@ -1,6 +1,7 @@
 ! { dg-do compile }
 ! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1" }
 ! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1 --param max-completely-peel-times=16" { target spu-*-* } }
+! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1 --param max-completely-peeled-insns=400" { target s390*-*-* } }
       subroutine anisonl(w,vo,anisox,s,ii1,jj1,weight)
       integer ii1,jj1,i1,iii1,j1,jjj1,k1,l1,m1,n1
       real*8 w(3,3),vo(3,3),anisox(3,3,3,3),s(60,60),weight