From 484ae26c8257d83aecf8775d14fc9f98bee74d84 Mon Sep 17 00:00:00 2001
From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 17 Feb 2010 09:45:31 +0000
Subject: 2010-02-17  Richard Guenther  <rguenther@suse.de>

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


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156825 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/tree-vrp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'gcc/tree-vrp.c')

diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 2f0f05965c1..152d389a9c7 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -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)
-- 
cgit v1.2.1