diff --git a/gcc.spec b/gcc.spec index 93159dc..e81cc54 100644 --- a/gcc.spec +++ b/gcc.spec @@ -211,6 +211,7 @@ Patch15: gcc6-pr69241.patch Patch16: gcc6-pr69628.patch Patch17: gcc6-pr69658.patch Patch18: gcc6-pr69691.patch +Patch19: gcc6-pr69274.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -782,6 +783,7 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go %patch16 -p0 -b .pr69628~ %patch17 -p0 -b .pr69658~ %patch18 -p0 -b .pr69691~ +%patch19 -p0 -b .pr69274~ %if 0%{?_enable_debug_packages} mkdir dwz-wrapper @@ -3091,6 +3093,7 @@ fi - fix character constant error recovery (PR c++/69628) - fix invalid diagnostics on C++ array initializers (PR c++/69658) - fix RA subreg handling (PR rtl-optimization/69691) +- fix up 435.gromacs performance regression (PR rtl-optimization/69274) * Mon Feb 1 2016 Jakub Jelinek 6.0.0-0.9 - update from the trunk diff --git a/gcc6-libgo-p224.patch b/gcc6-libgo-p224.patch index e142083..ec729cf 100644 --- a/gcc6-libgo-p224.patch +++ b/gcc6-libgo-p224.patch @@ -18,9 +18,9 @@ go/crypto/elliptic/p256.go go_crypto_hmac_files = \ ---- libgo/go/crypto/elliptic/elliptic.go.jj 2013-11-07 11:59:09.000000000 +0100 -+++ libgo/go/crypto/elliptic/elliptic.go 2014-03-05 15:21:04.186462859 +0100 -@@ -326,7 +326,6 @@ var p384 *CurveParams +--- libgo/go/crypto/elliptic/elliptic.go.jj 2016-02-05 20:11:20.000000000 +0100 ++++ libgo/go/crypto/elliptic/elliptic.go 2016-02-05 22:36:06.145039321 +0100 +@@ -338,7 +338,6 @@ var p384 *CurveParams var p521 *CurveParams func initAll() { @@ -28,8 +28,8 @@ initP256() initP384() initP521() ---- libgo/go/crypto/elliptic/elliptic_test.go.jj 2013-11-07 11:59:09.000000000 +0100 -+++ libgo/go/crypto/elliptic/elliptic_test.go 2014-03-05 15:46:03.739373453 +0100 +--- libgo/go/crypto/elliptic/elliptic_test.go.jj 2016-02-05 20:11:19.000000000 +0100 ++++ libgo/go/crypto/elliptic/elliptic_test.go 2016-02-05 22:37:37.857772875 +0100 @@ -5,39 +5,16 @@ package elliptic @@ -138,7 +138,7 @@ {"p256", P256()}, } -@@ -419,53 +360,13 @@ func TestInfinity(t *testing.T) { +@@ -419,21 +360,10 @@ func TestInfinity(t *testing.T) { } } @@ -161,7 +161,8 @@ k, _ := new(big.Int).SetString(e.k, 10) b.StartTimer() for i := 0; i < b.N; i++ { - p256.ScalarBaseMult(k.Bytes()) +@@ -452,32 +382,3 @@ func BenchmarkScalarMultP256(b *testing. + p256.ScalarMult(x, y, priv) } } - @@ -193,8 +194,8 @@ - t.Error("P224 failed to validate a correct point") - } -} ---- libgo/go/crypto/ecdsa/ecdsa_test.go.jj 2012-11-15 18:26:56.000000000 +0100 -+++ libgo/go/crypto/ecdsa/ecdsa_test.go 2014-03-05 15:26:38.461442929 +0100 +--- libgo/go/crypto/ecdsa/ecdsa_test.go.jj 2016-02-05 20:10:59.000000000 +0100 ++++ libgo/go/crypto/ecdsa/ecdsa_test.go 2016-02-05 22:41:54.916215999 +0100 @@ -33,7 +33,6 @@ func testKeyGeneration(t *testing.T, c e } @@ -203,7 +204,7 @@ if testing.Short() { return } -@@ -63,7 +62,6 @@ func testSignAndVerify(t *testing.T, c e +@@ -98,7 +97,6 @@ func testSignAndVerify(t *testing.T, c e } func TestSignAndVerify(t *testing.T) { @@ -211,7 +212,23 @@ if testing.Short() { return } -@@ -129,8 +127,6 @@ func TestVectors(t *testing.T) { +@@ -135,7 +133,6 @@ func testNonceSafety(t *testing.T, c ell + } + + func TestNonceSafety(t *testing.T) { +- testNonceSafety(t, elliptic.P224(), "p224") + if testing.Short() { + return + } +@@ -170,7 +167,6 @@ func testINDCCA(t *testing.T, c elliptic + } + + func TestINDCCA(t *testing.T) { +- testINDCCA(t, elliptic.P224(), "p224") + if testing.Short() { + return + } +@@ -236,8 +232,6 @@ func TestVectors(t *testing.T) { parts := strings.SplitN(line, ",", 2) switch parts[0] { @@ -220,9 +237,9 @@ case "P-256": pub.Curve = elliptic.P256() case "P-384": ---- libgo/go/crypto/x509/x509.go.jj 2013-11-07 11:59:09.000000000 +0100 -+++ libgo/go/crypto/x509/x509.go 2014-03-05 15:27:37.022439437 +0100 -@@ -308,9 +308,6 @@ func getPublicKeyAlgorithmFromOID(oid as +--- libgo/go/crypto/x509/x509.go.jj 2016-02-05 20:11:19.000000000 +0100 ++++ libgo/go/crypto/x509/x509.go 2016-02-05 22:36:06.147039294 +0100 +@@ -334,9 +334,6 @@ func getPublicKeyAlgorithmFromOID(oid as // RFC 5480, 2.1.1.1. Named Curve // @@ -232,7 +249,7 @@ // secp256r1 OBJECT IDENTIFIER ::= { // iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3) // prime(1) 7 } -@@ -323,7 +320,6 @@ func getPublicKeyAlgorithmFromOID(oid as +@@ -349,7 +346,6 @@ func getPublicKeyAlgorithmFromOID(oid as // // NB: secp256r1 is equivalent to prime256v1 var ( @@ -240,7 +257,7 @@ oidNamedCurveP256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7} oidNamedCurveP384 = asn1.ObjectIdentifier{1, 3, 132, 0, 34} oidNamedCurveP521 = asn1.ObjectIdentifier{1, 3, 132, 0, 35} -@@ -331,8 +327,6 @@ var ( +@@ -357,8 +353,6 @@ var ( func namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve { switch { @@ -249,7 +266,7 @@ case oid.Equal(oidNamedCurveP256): return elliptic.P256() case oid.Equal(oidNamedCurveP384): -@@ -345,8 +339,6 @@ func namedCurveFromOID(oid asn1.ObjectId +@@ -371,8 +365,6 @@ func namedCurveFromOID(oid asn1.ObjectId func oidFromNamedCurve(curve elliptic.Curve) (asn1.ObjectIdentifier, bool) { switch curve { @@ -258,7 +275,7 @@ case elliptic.P256(): return oidNamedCurveP256, true case elliptic.P384(): -@@ -1466,7 +1458,7 @@ func signingParamsForPublicKey(pub inter +@@ -1502,7 +1494,7 @@ func signingParamsForPublicKey(pub inter pubType = ECDSA switch pub.Curve { @@ -267,8 +284,8 @@ hashFunc = crypto.SHA256 sigAlgo.Algorithm = oidSignatureECDSAWithSHA256 case elliptic.P384(): ---- libgo/go/crypto/elliptic/p224.go.jj 2012-11-15 18:26:57.000000000 +0100 -+++ libgo/go/crypto/elliptic/p224.go 2014-03-05 15:30:01.189430842 +0100 +--- libgo/go/crypto/elliptic/p224.go.jj 2016-01-15 10:58:09.000000000 +0100 ++++ libgo/go/crypto/elliptic/p224.go 2016-02-05 22:36:06.147039294 +0100 @@ -1,765 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style @@ -1035,8 +1052,8 @@ - - return new(big.Int).SetBytes(buf[:]) -} ---- libgo/go/crypto/elliptic/p224_test.go.jj 2012-11-15 18:26:57.000000000 +0100 -+++ libgo/go/crypto/elliptic/p224_test.go 2014-03-05 15:29:58.743430988 +0100 +--- libgo/go/crypto/elliptic/p224_test.go.jj 2016-01-15 10:58:09.000000000 +0100 ++++ libgo/go/crypto/elliptic/p224_test.go 2016-02-05 22:36:06.148039280 +0100 @@ -1,47 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style @@ -1085,9 +1102,9 @@ - } - } -} ---- libgo/go/crypto/elliptic/p256.go.jj 2013-11-07 11:59:09.000000000 +0100 -+++ libgo/go/crypto/elliptic/p256.go 2014-03-05 15:34:31.910414701 +0100 -@@ -233,6 +233,8 @@ func p256ReduceCarry(inout *[p256Limbs]u +--- libgo/go/crypto/elliptic/p256.go.jj 2016-02-05 20:11:19.000000000 +0100 ++++ libgo/go/crypto/elliptic/p256.go 2016-02-05 22:36:06.148039280 +0100 +@@ -235,6 +235,8 @@ func p256ReduceCarry(inout *[p256Limbs]u inout[7] += carry << 25 } @@ -1096,7 +1113,7 @@ // p256Sum sets out = in+in2. // // On entry, in[i]+in2[i] must not overflow a 32-bit word. -@@ -265,6 +267,7 @@ const ( +@@ -267,6 +269,7 @@ const ( two31m2 = 1<<31 - 1<<2 two31p24m2 = 1<<31 + 1<<24 - 1<<2 two30m27m2 = 1<<30 - 1<<27 - 1<<2 diff --git a/gcc6-pr69274.patch b/gcc6-pr69274.patch new file mode 100644 index 0000000..67d6a69 --- /dev/null +++ b/gcc6-pr69274.patch @@ -0,0 +1,22 @@ +2016-02-05 Richard Biener + + PR rtl-optimization/69274 + * ira.c (ira_setup_alts): Do not change recog_data.operand + order. + +--- gcc/ira.c (revision 231814) ++++ gcc/ira.c (working copy) +@@ -1888,10 +1888,11 @@ ira_setup_alts (rtx_insn *insn, HARD_REG + } + if (commutative < 0) + break; +- if (curr_swapped) +- break; ++ /* Swap forth and back to avoid changing recog_data. */ + std::swap (recog_data.operand[commutative], + recog_data.operand[commutative + 1]); ++ if (curr_swapped) ++ break; + } + } +