aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-01-26 10:04:43 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2012-01-26 10:04:43 +0000
commit3d427cc1c8a0618874d8826acc1da7b392266081 (patch)
tree3845fc40ddfc591db5e9a6054579c807a2ac7c89 /gcc
parent2887732181ebf03ccc8d04521207b38437183cd9 (diff)
downloadgcc-3d427cc1c8a0618874d8826acc1da7b392266081.zip
gcc-3d427cc1c8a0618874d8826acc1da7b392266081.tar.gz
gcc-3d427cc1c8a0618874d8826acc1da7b392266081.tar.bz2
s390.h: Make BRANCH_COST an option.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.h2
-rw-r--r--gcc/config/s390/s390.opt6
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/pr44194-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr46309.c2
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_4.f1
7 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 338e038..e9b140e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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:
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index afd22ad..edc6399 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -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
diff --git a/gcc/config/s390/s390.opt b/gcc/config/s390/s390.opt
index 6ce32dc..51b395e 100644
--- a/gcc/config/s390/s390.opt
+++ b/gcc/config/s390/s390.opt
@@ -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.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 60e392b..0905ff1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.dg/pr44194-1.c b/gcc/testsuite/gcc.dg/pr44194-1.c
index cb65363..df042cd 100644
--- a/gcc/testsuite/gcc.dg/pr44194-1.c
+++ b/gcc/testsuite/gcc.dg/pr44194-1.c
@@ -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. */
diff --git a/gcc/testsuite/gcc.dg/pr46309.c b/gcc/testsuite/gcc.dg/pr46309.c
index f567afa..68a344a 100644
--- a/gcc/testsuite/gcc.dg/pr46309.c
+++ b/gcc/testsuite/gcc.dg/pr46309.c
@@ -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)
diff --git a/gcc/testsuite/gfortran.dg/reassoc_4.f b/gcc/testsuite/gfortran.dg/reassoc_4.f
index 1bcdf18..8ed7e19 100644
--- a/gcc/testsuite/gfortran.dg/reassoc_4.f
+++ b/gcc/testsuite/gfortran.dg/reassoc_4.f
@@ -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