diff mbox series

Fix typo in try_peel_loop

Message ID 39ec28ad-d815-7411-2c73-283213e0a9ba@linux.ibm.com
State New
Headers show
Series Fix typo in try_peel_loop | expand

Commit Message

Pat Haugen Oct. 31, 2018, 3:32 p.m. UTC
I observed the odd looking code while looking into something else and confirmed prior behavior (before r248863) was to sum the counts of the non-latch predecessors of the loop (in order to scale the loop such that it no longer appears to iterate).

Bootstrap/regtest on powerpc64le with no regressions. Committed as obvious.

-Pat


2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>

	* tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
	initialization.
diff mbox series

Patch

Index: gcc/tree-ssa-loop-ivcanon.c
===================================================================
--- gcc/tree-ssa-loop-ivcanon.c	(revision 264821)
+++ gcc/tree-ssa-loop-ivcanon.c	(working copy)
@@ -1139,10 +1139,10 @@  try_peel_loop (struct loop *loop,
     if (e->src != loop->latch)
       {
 	if (e->src->count.initialized_p ())
-	  entry_count = e->src->count + e->src->count;
+	  entry_count += e->src->count;
 	gcc_assert (!flow_bb_inside_loop_p (loop, e->src));
       }
-  profile_probability p = profile_probability::very_unlikely ();
+  profile_probability p;
   p = entry_count.probability_in (loop->header->count);
   scale_loop_profile (loop, p, 0);
   bitmap_set_bit (peeled_loops, loop->num);