public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR 69400: Invalid 128-bit modulus result
@ 2016-01-22  9:44 Richard Sandiford
  2016-01-22 10:10 ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2016-01-22  9:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

As described in the PR, wi::divmod_internal was sign- rather than
zero-extending a modulus result in cases where the result has fewer
HWIs than the precision and the upper bit of the upper HWI was set.

This patch tries to make things more robust by getting wi_pack
to handle the canonicalisation step itself.

Tested on x86_64-linux-gnu.  I added tests to the wide-int
plugin since that seemed more direct.  OK to install?

Thanks,
Richard


gcc/
	PR tree-optimization/69400
	* wide-int.cc (wi_pack): Take the precision as argument and
	perform canonicalization here rather than in the callers.
	Use the main loop to handle all full-width HWIs.  Add a
	zero HWI if in_len isn't a full result.
	(wi::divmod_internal): Update accordingly.
	(wi::mul_internal): Likewise.  Simplify.

gcc/testsuite/
	PR tree-optimization/69400
	* gcc.dg/plugin/wide-int_plugin.c (test_wide_int_mod_trunc): New
	function.
	(plugin_init): Call it.

diff --git a/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.c b/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.c
index 17604c8..eea56be 100644
--- a/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.c
+++ b/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.c
@@ -36,11 +36,44 @@ test_wide_int_round_sdiv (void)
     abort ();
 }
 
+static void
+test_wide_int_mod_trunc (void)
+{
+  for (unsigned int i = 1; i < MAX_BITSIZE_MODE_ANY_INT; ++i)
+    {
+      if (wi::smod_trunc (wi::lshift (1, i + 1) - 3,
+			  wi::lshift (1, i) - 1)
+	  != wi::lshift (1, i) - 2)
+	abort ();
+      for (unsigned int base = 32; base <= MAX_BITSIZE_MODE_ANY_INT; base *= 2)
+	for (int bias = -1; bias <= 1; ++bias)
+	  {
+	    unsigned int precision = base + bias;
+	    if (i + 1 < precision && precision <= MAX_BITSIZE_MODE_ANY_INT)
+	      {
+		wide_int one = wi::uhwi (1, precision);
+		wide_int a = wi::lshift (one, i + 1) - 3;
+		wide_int b = wi::lshift (one, i) - 1;
+		wide_int c = wi::lshift (one, i) - 2;
+		if (wi::umod_trunc (a, b) != c)
+		  abort ();
+		if (wi::smod_trunc (a, b) != c)
+		  abort ();
+		if (wi::smod_trunc (-a, b) != -c)
+		  abort ();
+		if (wi::smod_trunc (a, -b) != c)
+		  abort ();
+	      }
+	  }
+    }
+}
+
 int
 plugin_init (struct plugin_name_args *plugin_info,
 	     struct plugin_gcc_version *version)
 {
   test_double_int_round_udiv ();
   test_wide_int_round_sdiv ();
+  test_wide_int_mod_trunc ();
   return 0;
 }
diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc
index 35eee2c..80ebf5b 100644
--- a/gcc/wide-int.cc
+++ b/gcc/wide-int.cc
@@ -1215,29 +1215,31 @@ wi_unpack (unsigned HOST_HALF_WIDE_INT *result, const HOST_WIDE_INT *input,
 }
 
 /* The inverse of wi_unpack.  IN_LEN is the the number of input
-   blocks.  The number of output blocks will be half this amount.  */
-static void
-wi_pack (unsigned HOST_WIDE_INT *result,
+   blocks and PRECISION is the precision of the result.  Return the
+   number of blocks in the canonicalized result.  */
+static unsigned int
+wi_pack (HOST_WIDE_INT *result,
 	 const unsigned HOST_HALF_WIDE_INT *input,
-	 unsigned int in_len)
+	 unsigned int in_len, unsigned int precision)
 {
   unsigned int i = 0;
   unsigned int j = 0;
+  unsigned int blocks_needed = BLOCKS_NEEDED (precision);
 
-  while (i + 2 < in_len)
+  while (i + 1 < in_len)
     {
-      result[j++] = (unsigned HOST_WIDE_INT)input[i]
-	| ((unsigned HOST_WIDE_INT)input[i + 1]
-	   << HOST_BITS_PER_HALF_WIDE_INT);
+      result[j++] = ((unsigned HOST_WIDE_INT) input[i]
+		     | ((unsigned HOST_WIDE_INT) input[i + 1]
+			<< HOST_BITS_PER_HALF_WIDE_INT));
       i += 2;
     }
 
   /* Handle the case where in_len is odd.   For this we zero extend.  */
   if (in_len & 1)
-    result[j++] = (unsigned HOST_WIDE_INT)input[i];
-  else
-    result[j++] = (unsigned HOST_WIDE_INT)input[i]
-      | ((unsigned HOST_WIDE_INT)input[i + 1] << HOST_BITS_PER_HALF_WIDE_INT);
+    result[j++] = (unsigned HOST_WIDE_INT) input[i];
+  else if (j < blocks_needed)
+    result[j++] = 0;
+  return canonize (result, j, precision);
 }
 
 /* Multiply Op1 by Op2.  If HIGH is set, only the upper half of the
@@ -1460,19 +1462,8 @@ wi::mul_internal (HOST_WIDE_INT *val, const HOST_WIDE_INT *op1val,
 	  *overflow = true;
     }
 
-  if (high)
-    {
-      /* compute [prec] <- ([prec] * [prec]) >> [prec] */
-      wi_pack ((unsigned HOST_WIDE_INT *) val,
-	       &r[half_blocks_needed], half_blocks_needed);
-      return canonize (val, blocks_needed, prec);
-    }
-  else
-    {
-      /* compute [prec] <- ([prec] * [prec]) && ((1 << [prec]) - 1) */
-      wi_pack ((unsigned HOST_WIDE_INT *) val, r, half_blocks_needed);
-      return canonize (val, blocks_needed, prec);
-    }
+  int r_offset = high ? half_blocks_needed : 0;
+  return wi_pack (val, &r[r_offset], half_blocks_needed, prec);
 }
 
 /* Compute the population count of X.  */
@@ -1847,8 +1838,7 @@ wi::divmod_internal (HOST_WIDE_INT *quotient, unsigned int *remainder_len,
   unsigned int quotient_len = 0;
   if (quotient)
     {
-      wi_pack ((unsigned HOST_WIDE_INT *) quotient, b_quotient, m);
-      quotient_len = canonize (quotient, (m + 1) / 2, dividend_prec);
+      quotient_len = wi_pack (quotient, b_quotient, m, dividend_prec);
       /* The quotient is neg if exactly one of the divisor or dividend is
 	 neg.  */
       if (dividend_neg != divisor_neg)
@@ -1859,8 +1849,7 @@ wi::divmod_internal (HOST_WIDE_INT *quotient, unsigned int *remainder_len,
 
   if (remainder)
     {
-      wi_pack ((unsigned HOST_WIDE_INT *) remainder, b_remainder, n);
-      *remainder_len = canonize (remainder, (n + 1) / 2, dividend_prec);
+      *remainder_len = wi_pack (remainder, b_remainder, n, dividend_prec);
       /* The remainder is always the same sign as the dividend.  */
       if (dividend_neg)
 	*remainder_len = wi::sub_large (remainder, zeros, 1, remainder,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PR 69400: Invalid 128-bit modulus result
  2016-01-22  9:44 PR 69400: Invalid 128-bit modulus result Richard Sandiford
@ 2016-01-22 10:10 ` Jakub Jelinek
  2016-01-23 10:25   ` [PATCH] Fix up "the the" in the comments Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2016-01-22 10:10 UTC (permalink / raw)
  To: gcc-patches, nd, richard.sandiford

On Fri, Jan 22, 2016 at 09:43:52AM +0000, Richard Sandiford wrote:
> gcc/
> 	PR tree-optimization/69400
> 	* wide-int.cc (wi_pack): Take the precision as argument and
> 	perform canonicalization here rather than in the callers.
> 	Use the main loop to handle all full-width HWIs.  Add a
> 	zero HWI if in_len isn't a full result.
> 	(wi::divmod_internal): Update accordingly.
> 	(wi::mul_internal): Likewise.  Simplify.
> 
> gcc/testsuite/
> 	PR tree-optimization/69400
> 	* gcc.dg/plugin/wide-int_plugin.c (test_wide_int_mod_trunc): New
> 	function.
> 	(plugin_init): Call it.

I'd prefer to see also the testcase from the PR in the testsuite in addition
to the unit test.  Just make it /* { dg-do run { target int128 } } */
and put into gcc.dg/torture/

> --- a/gcc/wide-int.cc
> +++ b/gcc/wide-int.cc
> @@ -1215,29 +1215,31 @@ wi_unpack (unsigned HOST_HALF_WIDE_INT *result, const HOST_WIDE_INT *input,
>  }
>  
>  /* The inverse of wi_unpack.  IN_LEN is the the number of input

I know you haven't touched this line and it is preexisting, but when
touching this, please also fix the "the the".

Ok with those changes.

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix up "the the" in the comments
  2016-01-22 10:10 ` Jakub Jelinek
@ 2016-01-23 10:25   ` Jakub Jelinek
  2016-01-23 14:08     ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2016-01-23 10:25 UTC (permalink / raw)
  To: gcc-patches

On Fri, Jan 22, 2016 at 11:09:59AM +0100, Jakub Jelinek wrote:
> >  /* The inverse of wi_unpack.  IN_LEN is the the number of input
> 
> I know you haven't touched this line and it is preexisting, but when
> touching this, please also fix the "the the".

I'll leave this one to Richard, but found several other occurrences of
double the.

Ok for trunk?

2016-01-23  Jakub Jelinek  <jakub@redhat.com>

	* tree-ssanames.c (release_free_names_and_compact_live_names): Replace
	"the the" with "the" in the comments.
	* ipa-devirt.c (build_type_inheritance_graph,
	update_type_inheritance_graph): Likewise.
	* tree.c (build_function_type_list_1): Likewise.
	* cfgloopmanip.c (scale_loop_profile): Likewise.
	* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Likewise.
	* gimple-ssa-split-paths.c
	(find_block_to_duplicate_for_splitting_paths): Likewise.
	* tree-sra.c (init_subtree_with_zero, clobber_subtree): Likewise.
	* expr.c (convert_move): Likewise.
	* var-tracking.c (vt_stack_adjustments): Likewise.
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
	* tree-vrp.c (test_for_singularity): Likewise.

--- gcc/tree-ssanames.c.jj	2016-01-19 09:20:34.684621317 +0100
+++ gcc/tree-ssanames.c	2016-01-23 11:04:58.943667845 +0100
@@ -759,8 +759,8 @@ replace_ssa_name_symbol (tree ssa_name,
   TREE_TYPE (ssa_name) = TREE_TYPE (sym);
 }
 
-/* Release the vector of free SSA_NAMEs and compact the the
-   vector of SSA_NAMEs that are live.  */
+/* Release the vector of free SSA_NAMEs and compact the vector of SSA_NAMEs
+   that are live.  */
 
 static void
 release_free_names_and_compact_live_names (function *fun)
--- gcc/ipa-devirt.c.jj	2016-01-20 10:55:16.000000000 +0100
+++ gcc/ipa-devirt.c	2016-01-23 11:12:58.831782165 +0100
@@ -2246,7 +2246,7 @@ build_type_inheritance_graph (void)
     odr_vtable_hash = new odr_vtable_hash_type (23);
 
   /* We reconstruct the graph starting of types of all methods seen in the
-     the unit.  */
+     unit.  */
   FOR_EACH_SYMBOL (n)
     if (is_a <cgraph_node *> (n)
 	&& DECL_VIRTUAL_P (n->decl)
@@ -3406,7 +3406,7 @@ update_type_inheritance_graph (void)
   free_polymorphic_call_targets_hash ();
   timevar_push (TV_IPA_INHERITANCE);
   /* We reconstruct the graph starting from types of all methods seen in the
-     the unit.  */
+     unit.  */
   FOR_EACH_FUNCTION (n)
     if (DECL_VIRTUAL_P (n->decl)
 	&& !n->definition
--- gcc/tree.c.jj	2016-01-21 00:41:48.000000000 +0100
+++ gcc/tree.c	2016-01-23 11:14:10.887695051 +0100
@@ -8406,7 +8406,7 @@ build_function_type (tree value_type, tr
 
 /* Build a function type.  The RETURN_TYPE is the type returned by the
    function.  If VAARGS is set, no void_type_node is appended to the
-   the list.  ARGP must be always be terminated be a NULL_TREE.  */
+   list.  ARGP must be always be terminated be a NULL_TREE.  */
 
 static tree
 build_function_type_list_1 (bool vaargs, tree return_type, va_list argp)
--- gcc/cfgloopmanip.c.jj	2016-01-04 14:55:53.000000000 +0100
+++ gcc/cfgloopmanip.c	2016-01-23 11:11:23.835145225 +0100
@@ -569,7 +569,7 @@ scale_loop_profile (struct loop *loop, i
 	}
 
       /* Roughly speaking we want to reduce the loop body profile by the
-	 the difference of loop iterations.  We however can do better if
+	 difference of loop iterations.  We however can do better if
 	 we look at the actual profile, if it is available.  */
       scale = RDIV (iteration_bound * scale, iterations);
       if (loop->header->count)
--- gcc/tree-ssa-loop-ivopts.c.jj	2016-01-04 14:34:35.000000000 +0100
+++ gcc/tree-ssa-loop-ivopts.c	2016-01-23 11:15:04.917855839 +0100
@@ -4234,7 +4234,7 @@ get_address_cost (bool symbol_present, b
 }
 
  /* Calculate the SPEED or size cost of shiftadd EXPR in MODE.  MULT is the
-    the EXPR operand holding the shift.  COST0 and COST1 are the costs for
+    EXPR operand holding the shift.  COST0 and COST1 are the costs for
     calculating the operands of EXPR.  Returns true if successful, and returns
     the cost in COST.  */
 
--- gcc/gimple-ssa-split-paths.c.jj	2016-01-04 14:55:52.000000000 +0100
+++ gcc/gimple-ssa-split-paths.c	2016-01-23 11:12:15.332406316 +0100
@@ -74,7 +74,7 @@ find_block_to_duplicate_for_splitting_pa
 	    return NULL;
 
 	  /* And that BB's immediate dominator's successors are the
-	     the predecessors of BB.  */
+	     predecessors of BB.  */
 	  if (!find_edge (bb_idom, EDGE_PRED (bb, 0)->src)
 	      || !find_edge (bb_idom, EDGE_PRED (bb, 1)->src))
 	    return NULL;
--- gcc/tree-sra.c.jj	2016-01-19 09:20:33.000000000 +0100
+++ gcc/tree-sra.c	2016-01-23 11:14:32.110365414 +0100
@@ -2813,7 +2813,7 @@ generate_subtree_copies (struct access *
 }
 
 /* Assign zero to all scalar replacements in an access subtree.  ACCESS is the
-   the root of the subtree to be processed.  GSI is the statement iterator used
+   root of the subtree to be processed.  GSI is the statement iterator used
    for inserting statements which are added after the current statement if
    INSERT_AFTER is true or before it otherwise.  */
 
@@ -2853,7 +2853,7 @@ init_subtree_with_zero (struct access *a
     init_subtree_with_zero (child, gsi, insert_after, loc);
 }
 
-/* Clobber all scalar replacements in an access subtree.  ACCESS is the the
+/* Clobber all scalar replacements in an access subtree.  ACCESS is the
    root of the subtree to be processed.  GSI is the statement iterator used
    for inserting statements which are added after the current statement if
    INSERT_AFTER is true or before it otherwise.  */
--- gcc/expr.c.jj	2016-01-23 00:13:03.000000000 +0100
+++ gcc/expr.c	2016-01-23 11:11:43.380864773 +0100
@@ -485,7 +485,7 @@ convert_move (rtx to, rtx from, int unsi
       /* No special multiword conversion insn; do it by hand.  */
       start_sequence ();
 
-      /* Since we will turn this into a no conflict block, we must ensure the
+      /* Since we will turn this into a no conflict block, we must ensure
          the source does not overlap the target so force it into an isolated
          register when maybe so.  Likewise for any MEM input, since the
          conversion sequence might require several references to it and we
--- gcc/var-tracking.c.jj	2016-01-11 18:53:24.000000000 +0100
+++ gcc/var-tracking.c	2016-01-23 11:16:42.336342706 +0100
@@ -871,7 +871,7 @@ vt_stack_adjustments (void)
 	     pointer is often restored via a load-multiple instruction
 	     and so no stack_adjust offset is recorded for it.  This means
 	     that the stack offset at the end of the epilogue block is the
-	     the same as the offset before the epilogue, whereas other paths
+	     same as the offset before the epilogue, whereas other paths
 	     to the exit block will have the correct stack_adjust.
 
 	     It is safe to ignore these differences because (a) we never
--- gcc/tree-vect-data-refs.c.jj	2016-01-13 13:28:42.000000000 +0100
+++ gcc/tree-vect-data-refs.c	2016-01-23 11:15:45.149230953 +0100
@@ -1495,7 +1495,7 @@ vect_enhance_data_refs_alignment (loop_v
                  size (vector size / 8).  Vectorization factor will 8.  If both
                  access are misaligned by 3, the first one needs one scalar
                  iteration to be aligned, and the second one needs 5.  But the
-                 the first one will be aligned also by peeling 5 scalar
+		 first one will be aligned also by peeling 5 scalar
                  iterations, and in that case both accesses will be aligned.
                  Hence, except for the immediate peeling amount, we also want
                  to try to add full vector size, while we don't exceed
--- gcc/tree-vrp.c.jj	2016-01-19 09:20:24.000000000 +0100
+++ gcc/tree-vrp.c	2016-01-23 11:16:18.930706249 +0100
@@ -9257,8 +9257,8 @@ test_for_singularity (enum tree_code con
   tree min = NULL;
   tree max = NULL;
 
-  /* Extract minimum/maximum values which satisfy the
-     the conditional as it was written.  */
+  /* Extract minimum/maximum values which satisfy the conditional as it was
+     written.  */
   if (cond_code == LE_EXPR || cond_code == LT_EXPR)
     {
       /* This should not be negative infinity; there is no overflow


	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix up "the the" in the comments
  2016-01-23 10:25   ` [PATCH] Fix up "the the" in the comments Jakub Jelinek
@ 2016-01-23 14:08     ` Richard Biener
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Biener @ 2016-01-23 14:08 UTC (permalink / raw)
  To: Jakub Jelinek, gcc-patches

On January 23, 2016 11:25:48 AM GMT+01:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Fri, Jan 22, 2016 at 11:09:59AM +0100, Jakub Jelinek wrote:
>> >  /* The inverse of wi_unpack.  IN_LEN is the the number of input
>> 
>> I know you haven't touched this line and it is preexisting, but when
>> touching this, please also fix the "the the".
>
>I'll leave this one to Richard, but found several other occurrences of
>double the.
>
>Ok for trunk?

OK.

Thanks,
Richard.


>2016-01-23  Jakub Jelinek  <jakub@redhat.com>
>
>	* tree-ssanames.c (release_free_names_and_compact_live_names): Replace
>	"the the" with "the" in the comments.
>	* ipa-devirt.c (build_type_inheritance_graph,
>	update_type_inheritance_graph): Likewise.
>	* tree.c (build_function_type_list_1): Likewise.
>	* cfgloopmanip.c (scale_loop_profile): Likewise.
>	* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Likewise.
>	* gimple-ssa-split-paths.c
>	(find_block_to_duplicate_for_splitting_paths): Likewise.
>	* tree-sra.c (init_subtree_with_zero, clobber_subtree): Likewise.
>	* expr.c (convert_move): Likewise.
>	* var-tracking.c (vt_stack_adjustments): Likewise.
>	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
>	* tree-vrp.c (test_for_singularity): Likewise.
>
>--- gcc/tree-ssanames.c.jj	2016-01-19 09:20:34.684621317 +0100
>+++ gcc/tree-ssanames.c	2016-01-23 11:04:58.943667845 +0100
>@@ -759,8 +759,8 @@ replace_ssa_name_symbol (tree ssa_name,
>   TREE_TYPE (ssa_name) = TREE_TYPE (sym);
> }
> 
>-/* Release the vector of free SSA_NAMEs and compact the the
>-   vector of SSA_NAMEs that are live.  */
>+/* Release the vector of free SSA_NAMEs and compact the vector of
>SSA_NAMEs
>+   that are live.  */
> 
> static void
> release_free_names_and_compact_live_names (function *fun)
>--- gcc/ipa-devirt.c.jj	2016-01-20 10:55:16.000000000 +0100
>+++ gcc/ipa-devirt.c	2016-01-23 11:12:58.831782165 +0100
>@@ -2246,7 +2246,7 @@ build_type_inheritance_graph (void)
>     odr_vtable_hash = new odr_vtable_hash_type (23);
> 
>/* We reconstruct the graph starting of types of all methods seen in
>the
>-     the unit.  */
>+     unit.  */
>   FOR_EACH_SYMBOL (n)
>     if (is_a <cgraph_node *> (n)
> 	&& DECL_VIRTUAL_P (n->decl)
>@@ -3406,7 +3406,7 @@ update_type_inheritance_graph (void)
>   free_polymorphic_call_targets_hash ();
>   timevar_push (TV_IPA_INHERITANCE);
>/* We reconstruct the graph starting from types of all methods seen in
>the
>-     the unit.  */
>+     unit.  */
>   FOR_EACH_FUNCTION (n)
>     if (DECL_VIRTUAL_P (n->decl)
> 	&& !n->definition
>--- gcc/tree.c.jj	2016-01-21 00:41:48.000000000 +0100
>+++ gcc/tree.c	2016-01-23 11:14:10.887695051 +0100
>@@ -8406,7 +8406,7 @@ build_function_type (tree value_type, tr
> 
> /* Build a function type.  The RETURN_TYPE is the type returned by the
>    function.  If VAARGS is set, no void_type_node is appended to the
>-   the list.  ARGP must be always be terminated be a NULL_TREE.  */
>+   list.  ARGP must be always be terminated be a NULL_TREE.  */
> 
> static tree
>build_function_type_list_1 (bool vaargs, tree return_type, va_list
>argp)
>--- gcc/cfgloopmanip.c.jj	2016-01-04 14:55:53.000000000 +0100
>+++ gcc/cfgloopmanip.c	2016-01-23 11:11:23.835145225 +0100
>@@ -569,7 +569,7 @@ scale_loop_profile (struct loop *loop, i
> 	}
> 
>     /* Roughly speaking we want to reduce the loop body profile by the
>-	 the difference of loop iterations.  We however can do better if
>+	 difference of loop iterations.  We however can do better if
> 	 we look at the actual profile, if it is available.  */
>       scale = RDIV (iteration_bound * scale, iterations);
>       if (loop->header->count)
>--- gcc/tree-ssa-loop-ivopts.c.jj	2016-01-04 14:34:35.000000000 +0100
>+++ gcc/tree-ssa-loop-ivopts.c	2016-01-23 11:15:04.917855839 +0100
>@@ -4234,7 +4234,7 @@ get_address_cost (bool symbol_present, b
> }
> 
>/* Calculate the SPEED or size cost of shiftadd EXPR in MODE.  MULT is
>the
>-    the EXPR operand holding the shift.  COST0 and COST1 are the costs
>for
>+    EXPR operand holding the shift.  COST0 and COST1 are the costs for
>calculating the operands of EXPR.  Returns true if successful, and
>returns
>     the cost in COST.  */
> 
>--- gcc/gimple-ssa-split-paths.c.jj	2016-01-04 14:55:52.000000000 +0100
>+++ gcc/gimple-ssa-split-paths.c	2016-01-23 11:12:15.332406316 +0100
>@@ -74,7 +74,7 @@ find_block_to_duplicate_for_splitting_pa
> 	    return NULL;
> 
> 	  /* And that BB's immediate dominator's successors are the
>-	     the predecessors of BB.  */
>+	     predecessors of BB.  */
> 	  if (!find_edge (bb_idom, EDGE_PRED (bb, 0)->src)
> 	      || !find_edge (bb_idom, EDGE_PRED (bb, 1)->src))
> 	    return NULL;
>--- gcc/tree-sra.c.jj	2016-01-19 09:20:33.000000000 +0100
>+++ gcc/tree-sra.c	2016-01-23 11:14:32.110365414 +0100
>@@ -2813,7 +2813,7 @@ generate_subtree_copies (struct access *
> }
> 
>/* Assign zero to all scalar replacements in an access subtree.  ACCESS
>is the
>-   the root of the subtree to be processed.  GSI is the statement
>iterator used
>+   root of the subtree to be processed.  GSI is the statement iterator
>used
>for inserting statements which are added after the current statement if
>    INSERT_AFTER is true or before it otherwise.  */
> 
>@@ -2853,7 +2853,7 @@ init_subtree_with_zero (struct access *a
>     init_subtree_with_zero (child, gsi, insert_after, loc);
> }
> 
>-/* Clobber all scalar replacements in an access subtree.  ACCESS is
>the the
>+/* Clobber all scalar replacements in an access subtree.  ACCESS is
>the
>root of the subtree to be processed.  GSI is the statement iterator
>used
>for inserting statements which are added after the current statement if
>    INSERT_AFTER is true or before it otherwise.  */
>--- gcc/expr.c.jj	2016-01-23 00:13:03.000000000 +0100
>+++ gcc/expr.c	2016-01-23 11:11:43.380864773 +0100
>@@ -485,7 +485,7 @@ convert_move (rtx to, rtx from, int unsi
>       /* No special multiword conversion insn; do it by hand.  */
>       start_sequence ();
> 
>-      /* Since we will turn this into a no conflict block, we must
>ensure the
>+      /* Since we will turn this into a no conflict block, we must
>ensure
>    the source does not overlap the target so force it into an isolated
>         register when maybe so.  Likewise for any MEM input, since the
>      conversion sequence might require several references to it and we
>--- gcc/var-tracking.c.jj	2016-01-11 18:53:24.000000000 +0100
>+++ gcc/var-tracking.c	2016-01-23 11:16:42.336342706 +0100
>@@ -871,7 +871,7 @@ vt_stack_adjustments (void)
> 	     pointer is often restored via a load-multiple instruction
> 	     and so no stack_adjust offset is recorded for it.  This means
> 	     that the stack offset at the end of the epilogue block is the
>-	     the same as the offset before the epilogue, whereas other paths
>+	     same as the offset before the epilogue, whereas other paths
> 	     to the exit block will have the correct stack_adjust.
> 
> 	     It is safe to ignore these differences because (a) we never
>--- gcc/tree-vect-data-refs.c.jj	2016-01-13 13:28:42.000000000 +0100
>+++ gcc/tree-vect-data-refs.c	2016-01-23 11:15:45.149230953 +0100
>@@ -1495,7 +1495,7 @@ vect_enhance_data_refs_alignment (loop_v
>         size (vector size / 8).  Vectorization factor will 8.  If both
>             access are misaligned by 3, the first one needs one scalar
>          iteration to be aligned, and the second one needs 5.  But the
>-                 the first one will be aligned also by peeling 5
>scalar
>+		 first one will be aligned also by peeling 5 scalar
>            iterations, and in that case both accesses will be aligned.
>           Hence, except for the immediate peeling amount, we also want
>                  to try to add full vector size, while we don't exceed
>--- gcc/tree-vrp.c.jj	2016-01-19 09:20:24.000000000 +0100
>+++ gcc/tree-vrp.c	2016-01-23 11:16:18.930706249 +0100
>@@ -9257,8 +9257,8 @@ test_for_singularity (enum tree_code con
>   tree min = NULL;
>   tree max = NULL;
> 
>-  /* Extract minimum/maximum values which satisfy the
>-     the conditional as it was written.  */
>+  /* Extract minimum/maximum values which satisfy the conditional as
>it was
>+     written.  */
>   if (cond_code == LE_EXPR || cond_code == LT_EXPR)
>     {
>       /* This should not be negative infinity; there is no overflow
>
>
>	Jakub


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-23 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22  9:44 PR 69400: Invalid 128-bit modulus result Richard Sandiford
2016-01-22 10:10 ` Jakub Jelinek
2016-01-23 10:25   ` [PATCH] Fix up "the the" in the comments Jakub Jelinek
2016-01-23 14:08     ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).