OSDN Git Service

PR tree-optimization/32087
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jul 2007 17:11:24 +0000 (17:11 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jul 2007 17:11:24 +0000 (17:11 +0000)
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
Do not call scale_bbs_frequencies_int with prob of zero.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126959 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-loop-manip.c

index 017187c..7a82b3a 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-26  Steve Ellcey  <sje@cup.hp.com>
+
+       PR tree-optimization/32087
+       * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
+       Do not call scale_bbs_frequencies_int with prob of zero.
+
 2007-07-26  Julian Brown  <julian@codesourcery.com>
 
        * config/arm/arm-protos.h (neon_lane_bounds, neon_const_bounds)
index 4618ee4..6faac9b 100644 (file)
@@ -1035,8 +1035,9 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
   new_nonexit->count = exit_bb->count - new_exit->count;
   if (new_nonexit->count < 0)
     new_nonexit->count = 0;
-  scale_bbs_frequencies_int (&loop->latch, 1, new_nonexit->probability,
-                            prob);
+  if (prob > 0)
+    scale_bbs_frequencies_int (&loop->latch, 1, new_nonexit->probability,
+                              prob);
 
   /* Finally create the new counter for number of iterations and add the new
      exit instruction.  */