]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/53031 (gcc.dg/tree-ssa/vrp54.c scan-tree-dump-not vrp1 "link_error")
authorRichard Guenther <rguenther@suse.de>
Thu, 19 Apr 2012 13:21:44 +0000 (13:21 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 19 Apr 2012 13:21:44 +0000 (13:21 +0000)
2012-04-19  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/53031
* tree-vrp.c (adjust_range_with_scev): Revert back to
using max_loop_iterations.

From-SVN: r186592

gcc/ChangeLog
gcc/tree-vrp.c

index 655db81775f4034520338165b97ee63ae68d4721..0dca9338ff2d16e49c711cd99a14f483f12e3eb4 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-19  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/53031
+       * tree-vrp.c (adjust_range_with_scev): Revert back to
+       using max_loop_iterations.
+
 2012-04-19  Michael Matz  <matz@suse.de>
 
        * diagnostic.c (emit_diagnostic): Move va_end call after user
index 6602afb9b330092eeaee61d16fc4be71d2497e1a..73b3bb4b926d66e01ff0a7ce532e070ffd90c6ed 100644 (file)
@@ -3420,7 +3420,9 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop,
     {
       double_int nit;
 
-      if (max_stmt_executions (loop, &nit))
+      /* We are only entering here for loop header PHI nodes, so using
+        the number of latch executions is the correct thing to use.  */
+      if (max_loop_iterations (loop, &nit))
        {
          value_range_t maxvr = { VR_UNDEFINED, NULL_TREE, NULL_TREE, NULL };
          double_int dtmp;