re PR tree-optimization/61009 (Incorrect jump threading in dom)
authorJeff Law <law@redhat.com>
Thu, 12 Jun 2014 17:12:18 +0000 (11:12 -0600)
committerJeff Law <law@gcc.gnu.org>
Thu, 12 Jun 2014 17:12:18 +0000 (11:12 -0600)
        PR tree-optimization/61009
* tree-ssa-threadedge.c (thread_through_normal_block): Correct return
value when we stop processing a block due to problematic PHIs.

From-SVN: r211586

gcc/ChangeLog
gcc/tree-ssa-threadedge.c

index a42b94d3a1e6f34a9732b4cee9c88c60f8a35b4c..d68262fd3414994c5417ebeab0ec59ed24e1e04d 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-12  Jeff Law  <law@redhat.com>
+
+        PR tree-optimization/61009
+       * tree-ssa-threadedge.c (thread_through_normal_block): Correct return
+       value when we stop processing a block due to problematic PHIs.
+
 2014-06-12  Alan Lawrence  <alan.lawrence@arm.com>
 
        * config/aarch64/arm_neon.h (vmlaq_n_f64, vmlsq_n_f64, vrsrtsq_f64,
index ba9e1fe30f4444ab448a1fd16447b644d4d9a9f4..a76a7ce658750b124715a1c452a417433f9f12af 100644 (file)
@@ -948,9 +948,12 @@ thread_through_normal_block (edge e,
   if (*backedge_seen_p)
     simplify = dummy_simplify;
 
-  /* PHIs create temporary equivalences.  */
+  /* PHIs create temporary equivalences.
+     Note that if we found a PHI that made the block non-threadable, then
+     we need to bubble that up to our caller in the same manner we do
+     when we prematurely stop processing statements below.  */
   if (!record_temporary_equivalences_from_phis (e, stack))
-    return 0;
+    return -1;
 
   /* Now walk each statement recording any context sensitive
      temporary equivalences we can detect.  */