tree-vrp.c (vrp_visit_phi_node): Restrict SCEV analysis to loop PHI nodes.
authorRichard Guenther <rguenther@suse.de>
Wed, 17 Feb 2010 09:45:31 +0000 (09:45 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 17 Feb 2010 09:45:31 +0000 (09:45 +0000)
2010-02-17  Richard Guenther  <rguenther@suse.de>

* tree-vrp.c (vrp_visit_phi_node): Restrict SCEV analysis
to loop PHI nodes.

From-SVN: r156825

gcc/ChangeLog
gcc/tree-vrp.c

index 31f251d2c75c6b5a6802a27c12bbda622fbe91a3..e486fd02e19ba5a8511e3642b2b6f8bb05a04036 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-17  Richard Guenther  <rguenther@suse.de>
+
+       * tree-vrp.c (vrp_visit_phi_node): Restrict SCEV analysis
+       to loop PHI nodes.
+
 2010-02-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/42918
index 2f0f05965c1bb6688876ccecc0d5b886ede6e7b3..152d389a9c7bd381d8dc0992bae6eb81699b14a8 100644 (file)
@@ -6318,11 +6318,10 @@ vrp_visit_phi_node (gimple phi)
     }
 
   /* If this is a loop PHI node SCEV may known more about its
-     value-range.
-     ???  Identify loop PHI nodes properly.   */
+     value-range.  */
   if (current_loops
       && (l = loop_containing_stmt (phi))
-      && loop_outer (l))
+      && l->header == gimple_bb (phi))
     adjust_range_with_scev (&vr_result, l, phi, lhs);
 
   if (vr_result.type == VR_VARYING)