[gcc] 5.0.0-0.19

Jakub Jelinek jakub at fedoraproject.org
Fri Mar 13 18:15:10 UTC 2015


commit 7fcf30a7eafec1f17fed004d31d9b7eb7f9baffd
Author: Jakub Jelinek <jakub at redhat.com>
Date:   Fri Mar 13 19:15:06 2015 +0100

    5.0.0-0.19

 .gitignore              |   1 +
 gcc.spec                |  57 +++++----
 gcc5-arm-fnsect.patch   |  25 ----
 gcc5-pr64367.patch      |  17 ---
 gcc5-pr65032.patch      | 203 -------------------------------
 gcc5-pr65040.patch      |  43 -------
 gcc5-pr65048-test.patch |  24 ----
 gcc5-pr65215.patch      | 314 ------------------------------------------------
 gcc5-pr65216.patch      |  56 ---------
 gcc5-pr65220.patch      |  64 ----------
 gcc5-pr65228.patch      |  35 ------
 gcc5-pr65369.patch      |  81 +++++++++++++
 gcc5-pr65401.patch      | 151 +++++++++++++++++++++++
 gcc5-pr65418.patch      |  89 ++++++++++++++
 sources                 |   2 +-
 15 files changed, 359 insertions(+), 803 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 01b217b..bcc3c94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@
 /gcc-5.0.0-20150217.tar.bz2
 /gcc-5.0.0-20150224.tar.bz2
 /gcc-5.0.0-20150226.tar.bz2
+/gcc-5.0.0-20150313.tar.bz2
diff --git a/gcc.spec b/gcc.spec
index 9c14996..00266a8 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20150226
-%global SVNREV 221028
+%global DATE 20150313
+%global SVNREV 221424
 %global gcc_version 5.0.0
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 0.18
+%global gcc_release 0.19
 %global _unpackaged_files_terminate_build 0
 %global _performance_build 1
 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -198,15 +198,9 @@ Patch11: gcc5-no-add-needed.patch
 Patch12: gcc5-libgo-p224.patch
 Patch13: gcc5-aarch64-async-unw-tables.patch
 Patch14: gcc5-libsanitize-aarch64-va42.patch
-Patch15: gcc5-arm-fnsect.patch
-Patch16: gcc5-pr65215.patch
-Patch17: gcc5-pr65216.patch
-Patch18: gcc5-pr64367.patch
-Patch19: gcc5-pr65032.patch
-Patch20: gcc5-pr65040.patch
-Patch21: gcc5-pr65048-test.patch
-Patch22: gcc5-pr65220.patch
-Patch23: gcc5-pr65228.patch
+Patch15: gcc5-pr65369.patch
+Patch16: gcc5-pr65401.patch
+Patch17: gcc5-pr65418.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -756,15 +750,9 @@ package or when debugging this package.
 rm -f libgo/go/crypto/elliptic/p224{,_test}.go
 %patch13 -p0 -b .aarch64-async-unw-tables~
 %patch14 -p0 -b .libsanitize-aarch64-va42~
-%patch15 -p0 -b .arm-fnsect~
-%patch16 -p0 -b .pr65215~
-%patch17 -p0 -b .pr65216~
-%patch18 -p0 -b .pr64367~
-%patch19 -p0 -b .pr65032~
-%patch20 -p0 -b .pr65040~
-%patch21 -p0 -b .pr65048-test~
-%patch22 -p0 -b .pr65220~
-%patch23 -p0 -b .pr65228~
+%patch15 -p0 -b .pr65369~
+%patch16 -p0 -b .pr65401~
+%patch17 -p0 -b .pr65418~
 
 %if 0%{?_enable_debug_packages}
 mkdir dwz-wrapper
@@ -2950,6 +2938,33 @@ fi
 %doc rpm.doc/changelogs/libcc1/ChangeLog*
 
 %changelog
+* Fri Mar 13 2015 Jakub Jelinek <jakub at redhat.com> 5.0.0-0.19
+- update from the trunk
+  - PRs ada/65259, ada/65319, bootstrap/25672, bootstrap/65150, c++/64227,
+	c++/64398, c++/64665, c++/64834, c++/65127, c++/65295, c++/65323,
+	c++/65333, c++/65339, c++/65370, c/35330, c/65120, fortran/60898,
+	fortran/65024, ipa/64693, ipa/64988, ipa/65130, ipa/65232, ipa/65236,
+	ipa/65237, ipa/65245, ipa/65263, ipa/65270, ipa/65282, ipa/65287,
+	ipa/65302, ipa/65316, ipa/65318, ipa/65334, libfortran/65200,
+	libgcc/64885, libstdc++/64367, libstdc++/64441, libstdc++/64797,
+	libstdc++/65246, libstdc++/65279, lto/65193, lto/65276, lto/65316,
+	lto/65361, middle-end/44563, middle-end/63155, middle-end/63175,
+	middle-end/64928, middle-end/65233, middle-end/65270,
+	middle-end/65315, other/65384, rtl-optimization/64895,
+	rtl-optimization/65067, rtl-optimization/65235,
+	rtl-optimization/65321, sanitizer/63958, sanitizer/65280,
+	sanitizer/65367, target/58158, target/59828, target/62247,
+	target/62251, target/64317, target/64331, target/64342, target/64600,
+	target/65038, target/65044, target/65103, target/65121, target/65138,
+	target/65183, target/65184, target/65192, target/65242, target/65249,
+	target/65261, target/65286, target/65296, target/65368,
+	tree-optimization/63743, tree-optimization/65241,
+	tree-optimization/65310, tree-optimization/65355,
+	tree-optimization/65388
+- fix vectorization of unaligned loads on powerpc (PR tree-optimization/65369)
+- fix combiner on big-endian targets (PR rtl-optimization/65401)
+- fix reassoc bit test optimization (PR tree-optimization/65418)
+
 * Fri Feb 27 2015 Jakub Jelinek <jakub at redhat.com> 5.0.0-0.18
 - fix compilation of stdexcept with clang (PR libstdc++-v3/64367)
 - fix scratch handling in LRA rematerialization (PR target/65032)   
diff --git a/gcc5-pr65369.patch b/gcc5-pr65369.patch
new file mode 100644
index 0000000..d355d88
--- /dev/null
+++ b/gcc5-pr65369.patch
@@ -0,0 +1,81 @@
+2015-03-13  Jakub Jelinek  <jakub at redhat.com>
+
+	PR tree-optimization/65369
+	* tree-vect-stmts.c (vectorizable_load) <case dr_explicit_realign>:
+	Set bump to vs * TYPE_SIZE_UNIT (elem_type) - 1 instead of
+	(vs - 1) * TYPE_SIZE_UNIT (elem_type).
+
+	* gcc.c-torture/execute/pr65369.c: New test.
+
+--- gcc/tree-vect-stmts.c.jj	2015-03-09 08:05:13.000000000 +0100
++++ gcc/tree-vect-stmts.c	2015-03-13 17:27:30.613529768 +0100
+@@ -6468,9 +6468,8 @@ vectorizable_load (gimple stmt, gimple_s
+ 		case dr_explicit_realign:
+ 		  {
+ 		    tree ptr, bump;
+-		    tree vs_minus_1;
+ 
+-		    vs_minus_1 = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
++		    tree vs = size_int (TYPE_VECTOR_SUBPARTS (vectype));
+ 
+ 		    if (compute_in_loop)
+ 		      msq = vect_setup_realignment (first_stmt, gsi,
+@@ -6499,8 +6498,9 @@ vectorizable_load (gimple stmt, gimple_s
+ 		    vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ 		    msq = new_temp;
+ 
+-		    bump = size_binop (MULT_EXPR, vs_minus_1,
++		    bump = size_binop (MULT_EXPR, vs,
+ 				       TYPE_SIZE_UNIT (elem_type));
++		    bump = size_binop (MINUS_EXPR, bump, size_one_node);
+ 		    ptr = bump_vector_ptr (dataref_ptr, NULL, gsi, stmt, bump);
+ 		    new_stmt = gimple_build_assign
+ 				 (NULL_TREE, BIT_AND_EXPR, ptr,
+--- gcc/testsuite/gcc.c-torture/execute/pr65369.c.jj	2015-03-13 17:37:10.926175685 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr65369.c	2015-03-13 17:35:40.000000000 +0100
+@@ -0,0 +1,45 @@
++/* PR tree-optimization/65369 */
++
++static const char data[] =
++  "12345678901234567890123456789012345678901234567890"
++  "123456789012345678901234567890";
++
++__attribute__ ((noinline))
++static void foo (const unsigned int *buf)
++{
++  if (__builtin_memcmp (buf, data, 64))
++    __builtin_abort ();
++}
++
++__attribute__ ((noinline))
++static void bar (const unsigned char *block)
++{
++  unsigned int buf[16];
++  __builtin_memcpy (buf +  0, block +  0, 4);
++  __builtin_memcpy (buf +  1, block +  4, 4);
++  __builtin_memcpy (buf +  2, block +  8, 4);
++  __builtin_memcpy (buf +  3, block + 12, 4);
++  __builtin_memcpy (buf +  4, block + 16, 4);
++  __builtin_memcpy (buf +  5, block + 20, 4);
++  __builtin_memcpy (buf +  6, block + 24, 4);
++  __builtin_memcpy (buf +  7, block + 28, 4);
++  __builtin_memcpy (buf +  8, block + 32, 4);
++  __builtin_memcpy (buf +  9, block + 36, 4);
++  __builtin_memcpy (buf + 10, block + 40, 4);
++  __builtin_memcpy (buf + 11, block + 44, 4);
++  __builtin_memcpy (buf + 12, block + 48, 4);
++  __builtin_memcpy (buf + 13, block + 52, 4);
++  __builtin_memcpy (buf + 14, block + 56, 4);
++  __builtin_memcpy (buf + 15, block + 60, 4);
++  foo (buf);
++}
++
++int
++main ()
++{
++  unsigned char input[sizeof data + 16] __attribute__((aligned (16)));
++  __builtin_memset (input, 0, sizeof input);
++  __builtin_memcpy (input + 1, data, sizeof data);
++  bar (input + 1);
++  return 0;
++}
diff --git a/gcc5-pr65401.patch b/gcc5-pr65401.patch
new file mode 100644
index 0000000..c4f31bc
--- /dev/null
+++ b/gcc5-pr65401.patch
@@ -0,0 +1,151 @@
+2015-03-13  Jakub Jelinek  <jakub at redhat.com>
+
+	PR rtl-optimization/65401
+	* combine.c (rtx_equal_for_field_assignment_p): Add widen_x
+	argument.  If true, adjust_address_nv of x with big-endian
+	correction for the mode widening to GET_MODE (y).
+	(make_field_assignment): Don't do MEM mode widening here.
+	Use MEM_P instead of GET_CODE == MEM.
+
+	* gcc.c-torture/execute/pr65401.c: New test.
+
+--- gcc/combine.c.jj	2015-02-03 10:38:46.000000000 +0100
++++ gcc/combine.c	2015-03-13 18:46:45.710940306 +0100
+@@ -475,7 +475,7 @@ static rtx force_to_mode (rtx, machine_m
+ 			  unsigned HOST_WIDE_INT, int);
+ static rtx if_then_else_cond (rtx, rtx *, rtx *);
+ static rtx known_cond (rtx, enum rtx_code, rtx, rtx);
+-static int rtx_equal_for_field_assignment_p (rtx, rtx);
++static int rtx_equal_for_field_assignment_p (rtx, rtx, bool = false);
+ static rtx make_field_assignment (rtx);
+ static rtx apply_distributive_law (rtx);
+ static rtx distribute_and_simplify_rtx (rtx, int);
+@@ -9184,8 +9184,23 @@ known_cond (rtx x, enum rtx_code cond, r
+    assignment as a field assignment.  */
+ 
+ static int
+-rtx_equal_for_field_assignment_p (rtx x, rtx y)
++rtx_equal_for_field_assignment_p (rtx x, rtx y, bool widen_x)
+ {
++  if (widen_x && GET_MODE (x) != GET_MODE (y))
++    {
++      if (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (y)))
++	return 0;
++      if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
++	return 0;
++      /* For big endian, adjust the memory offset.  */
++      if (BYTES_BIG_ENDIAN)
++	x = adjust_address_nv (x, GET_MODE (y),
++			       -subreg_lowpart_offset (GET_MODE (x),
++						       GET_MODE (y)));
++      else
++	x = adjust_address_nv (x, GET_MODE (y), 0);
++    }
++
+   if (x == y || rtx_equal_p (x, y))
+     return 1;
+ 
+@@ -9339,16 +9354,15 @@ make_field_assignment (rtx x)
+   /* The second SUBREG that might get in the way is a paradoxical
+      SUBREG around the first operand of the AND.  We want to 
+      pretend the operand is as wide as the destination here.   We
+-     do this by creating a new MEM in the wider mode for the sole
++     do this by adjusting the MEM to wider mode for the sole
+      purpose of the call to rtx_equal_for_field_assignment_p.   Also
+      note this trick only works for MEMs.  */
+   else if (GET_CODE (rhs) == AND
+ 	   && paradoxical_subreg_p (XEXP (rhs, 0))
+-	   && GET_CODE (SUBREG_REG (XEXP (rhs, 0))) == MEM
++	   && MEM_P (SUBREG_REG (XEXP (rhs, 0)))
+ 	   && CONST_INT_P (XEXP (rhs, 1))
+-	   && rtx_equal_for_field_assignment_p (gen_rtx_MEM (GET_MODE (dest),
+-							     XEXP (SUBREG_REG (XEXP (rhs, 0)), 0)),
+-						dest))
++	   && rtx_equal_for_field_assignment_p (SUBREG_REG (XEXP (rhs, 0)),
++						dest, true))
+     c1 = INTVAL (XEXP (rhs, 1)), other = lhs;
+   else if (GET_CODE (lhs) == AND
+ 	   && CONST_INT_P (XEXP (lhs, 1))
+@@ -9357,16 +9371,15 @@ make_field_assignment (rtx x)
+   /* The second SUBREG that might get in the way is a paradoxical
+      SUBREG around the first operand of the AND.  We want to 
+      pretend the operand is as wide as the destination here.   We
+-     do this by creating a new MEM in the wider mode for the sole
++     do this by adjusting the MEM to wider mode for the sole
+      purpose of the call to rtx_equal_for_field_assignment_p.   Also
+      note this trick only works for MEMs.  */
+   else if (GET_CODE (lhs) == AND
+ 	   && paradoxical_subreg_p (XEXP (lhs, 0))
+-	   && GET_CODE (SUBREG_REG (XEXP (lhs, 0))) == MEM
++	   && MEM_P (SUBREG_REG (XEXP (lhs, 0)))
+ 	   && CONST_INT_P (XEXP (lhs, 1))
+-	   && rtx_equal_for_field_assignment_p (gen_rtx_MEM (GET_MODE (dest),
+-							     XEXP (SUBREG_REG (XEXP (lhs, 0)), 0)),
+-						dest))
++	   && rtx_equal_for_field_assignment_p (SUBREG_REG (XEXP (lhs, 0)),
++						dest, true))
+     c1 = INTVAL (XEXP (lhs, 1)), other = rhs;
+   else
+     return x;
+--- gcc/testsuite/gcc.c-torture/execute/pr65401.c.jj	2015-03-13 18:36:30.639817393 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr65401.c	2015-03-13 18:42:02.693485127 +0100
+@@ -0,0 +1,59 @@
++/* PR rtl-optimization/65401 */
++
++struct S { unsigned short s[64]; };
++
++__attribute__((noinline, noclone)) void
++foo (struct S *x)
++{
++  unsigned int i;
++  unsigned char *s;
++
++  s = (unsigned char *) x->s;
++  for (i = 0; i < 64; i++)
++    x->s[i] = s[i * 2] | (s[i * 2 + 1] << 8);
++}  
++
++__attribute__((noinline, noclone)) void
++bar (struct S *x)
++{
++  unsigned int i;
++  unsigned char *s;
++
++  s = (unsigned char *) x->s;
++  for (i = 0; i < 64; i++)
++    x->s[i] = (s[i * 2] << 8) | s[i * 2 + 1];
++}  
++
++int
++main ()
++{
++  unsigned int i;
++  struct S s;
++  if (sizeof (unsigned short) != 2)
++    return 0;
++  for (i = 0; i < 64; i++)
++    s.s[i] = i + ((64 - i) << 8);
++  foo (&s);
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++  for (i = 0; i < 64; i++)
++    if (s.s[i] != (64 - i) + (i << 8))
++      __builtin_abort ();
++#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
++  for (i = 0; i < 64; i++)
++    if (s.s[i] != i + ((64 - i) << 8))
++      __builtin_abort ();
++#endif
++  for (i = 0; i < 64; i++)
++    s.s[i] = i + ((64 - i) << 8);
++  bar (&s);
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
++  for (i = 0; i < 64; i++)
++    if (s.s[i] != (64 - i) + (i << 8))
++      __builtin_abort ();
++#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++  for (i = 0; i < 64; i++)
++    if (s.s[i] != i + ((64 - i) << 8))
++      __builtin_abort ();
++#endif
++  return 0;
++}
diff --git a/gcc5-pr65418.patch b/gcc5-pr65418.patch
new file mode 100644
index 0000000..10b9351
--- /dev/null
+++ b/gcc5-pr65418.patch
@@ -0,0 +1,89 @@
+2015-03-13  Jakub Jelinek  <jakub at redhat.com>
+
+	PR tree-optimization/65418
+	* tree-ssa-reassoc.c (extract_bit_test_mask): If there
+	are casts in the first PLUS_EXPR operand, ensure tbias and
+	*totallowp are in the inner type.
+
+	* gcc.c-torture/execute/pr65418-1.c: New test.
+	* gcc.c-torture/execute/pr65418-2.c: New test.
+
+--- gcc/tree-ssa-reassoc.c.jj	2015-02-26 22:02:39.000000000 +0100
++++ gcc/tree-ssa-reassoc.c	2015-03-13 16:22:50.506295252 +0100
+@@ -2439,26 +2439,25 @@ extract_bit_test_mask (tree exp, int pre
+ 	      && TREE_CODE (exp) == PLUS_EXPR
+ 	      && TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST)
+ 	    {
++	      tree ret = TREE_OPERAND (exp, 0);
++	      STRIP_NOPS (ret);
+ 	      widest_int bias
+ 	        = wi::neg (wi::sext (wi::to_widest (TREE_OPERAND (exp, 1)),
+ 				     TYPE_PRECISION (TREE_TYPE (low))));
+-	      tree tbias = wide_int_to_tree (TREE_TYPE (low), bias);
++	      tree tbias = wide_int_to_tree (TREE_TYPE (ret), bias);
+ 	      if (totallowp)
+ 		{
+ 		  *totallowp = tbias;
+-		  exp = TREE_OPERAND (exp, 0);
+-		  STRIP_NOPS (exp);
+-		  return exp;
++		  return ret;
+ 		}
+ 	      else if (!tree_int_cst_lt (totallow, tbias))
+ 		return NULL_TREE;
++	      bias = wi::to_widest (tbias);
+ 	      bias -= wi::to_widest (totallow);
+ 	      if (wi::ges_p (bias, 0) && wi::lts_p (bias, prec - max))
+ 		{
+ 		  *mask = wi::lshift (*mask, bias);
+-		  exp = TREE_OPERAND (exp, 0);
+-		  STRIP_NOPS (exp);
+-		  return exp;
++		  return ret;
+ 		}
+ 	    }
+ 	}
+--- gcc/testsuite/gcc.c-torture/execute/pr65418-1.c.jj	2015-03-13 16:49:07.973604649 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr65418-1.c	2015-03-13 16:48:28.000000000 +0100
+@@ -0,0 +1,19 @@
++/* PR tree-optimization/65418 */
++
++__attribute__((noinline, noclone)) int
++foo (int x)
++{
++  if (x == -216 || x == -132 || x == -218 || x == -146)
++     return 1;
++  return 0;
++}
++
++int
++main ()
++{
++  volatile int i;
++  for (i = -230; i < -120; i++)
++    if (foo (i) != (i == -216 || i == -132 || i == -218 || i == -146))
++      __builtin_abort ();
++  return 0;
++}
+--- gcc/testsuite/gcc.c-torture/execute/pr65418-2.c.jj	2015-03-13 16:49:10.992556110 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr65418-2.c	2015-03-13 16:48:44.000000000 +0100
+@@ -0,0 +1,19 @@
++/* PR tree-optimization/65418 */
++
++__attribute__((noinline, noclone)) int
++foo (int x)
++{
++  if (x == -216 || x == -211 || x == -218 || x == -205 || x == -223)
++     return 1;
++  return 0;
++}
++
++int
++main ()
++{
++  volatile int i;
++  for (i = -230; i < -200; i++)
++    if (foo (i) != (i == -216 || i == -211 || i == -218 || i == -205 || i == -223))
++      __builtin_abort ();
++  return 0;
++}
diff --git a/sources b/sources
index ba5c027..5df6f80 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6906d4ba6f221b58c1b6878e870a236c  gcc-5.0.0-20150226.tar.bz2
+51d8b914dba658c69d23c5f7853f843c  gcc-5.0.0-20150313.tar.bz2


More information about the scm-commits mailing list