Patchwork [PR,57276] Add a missing break in cgraph_edge_brings_all_agg_vals_for_node

login
register
mail settings
Submitter Martin Jambor
Date May 15, 2013, 3:17 p.m.
Message ID <20130515151746.GK3568@virgil.suse>
Download mbox | patch
Permalink /patch/244110/
State New
Headers show

Comments

Martin Jambor - May 15, 2013, 3:17 p.m.
Hi,

in PR 57276, Po-Chun Chang noticed there is a missing break in a loop
in cgraph_edge_brings_all_agg_vals_for_node.  This patch adds it.

Bootstrapped and tested on x86_64-linux.  I consider it trivial and
will commit t some time tomorrow if there are no objections.

Thanks,

Martin


2013-05-15  Po-Chun Chang  <pchang9@cs.wisc.edu>
	    Martin Jambor  <mjambor@suse.cz>

	PR middle-end/57276
	* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Break when a
	value that corresponds to the given aggval is found in values vector.

Patch

Index: src/gcc/ipa-cp.c
===================================================================
--- src.orig/gcc/ipa-cp.c
+++ src/gcc/ipa-cp.c
@@ -3213,7 +3213,10 @@  cgraph_edge_brings_all_agg_vals_for_node
 	      if (item->value
 		  && item->offset == av->offset
 		  && values_equal_for_ipcp_p (item->value, av->value))
-		found = true;
+		{
+		  found = true;
+		  break;
+		}
 	    if (!found)
 	      {
 		values.release();