Fix typos in 2 functions.
authorMartin Liska <mliska@suse.cz>
Tue, 10 Dec 2019 08:36:56 +0000 (09:36 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 10 Dec 2019 08:36:56 +0000 (08:36 +0000)
2019-12-10  Martin Liska  <mliska@suse.cz>

PR tree-optimization/92862
* predict.c (predict_paths_leading_to_edge): Fix typo from e to e2.
* tree-ssa-loop-niter.c (loop_only_exit_p): Return false
instead of true;

From-SVN: r279156

gcc/ChangeLog
gcc/predict.c
gcc/tree-ssa-loop-niter.c

index 42ae999103b7690a956e5a8d970dd8bc5c330679..9e53a323e1eb0dc571fa00f43aa3c9d40409c820 100644 (file)
@@ -1,3 +1,10 @@
+2019-12-10  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/92862
+       * predict.c (predict_paths_leading_to_edge): Fix typo from e to e2.
+       * tree-ssa-loop-niter.c (loop_only_exit_p): Return false
+       instead of true;
+
 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
 
        * gcc-rich-location.c
index 67f850de17a478c29efb9f0be0dede15be4c986e..8db24816d2939dfcb7923b456a3b971ccdca3a91 100644 (file)
@@ -3217,16 +3217,15 @@ predict_paths_leading_to_edge (edge e, enum br_predictor pred,
   basic_block bb = e->src;
   FOR_EACH_EDGE (e2, ei, bb->succs)
     if (e2->dest != e->src && e2->dest != e->dest
-       && !unlikely_executed_edge_p (e)
+       && !unlikely_executed_edge_p (e2)
        && !dominated_by_p (CDI_POST_DOMINATORS, e->src, e2->dest))
       {
        has_nonloop_edge = true;
        break;
       }
+
   if (!has_nonloop_edge)
-    {
-      predict_paths_for_bb (bb, bb, pred, taken, auto_bitmap (), in_loop);
-    }
+    predict_paths_for_bb (bb, bb, pred, taken, auto_bitmap (), in_loop);
   else
     predict_edge_def (e, pred, taken);
 }
index f0dd9a0b36345e245b915db3dab33a2228421fee..39e937705f140b8392e7c3a42bfd97d20ab0161a 100644 (file)
@@ -2376,13 +2376,9 @@ loop_only_exit_p (const class loop *loop, basic_block *body, const_edge exit)
     return false;
 
   for (i = 0; i < loop->num_nodes; i++)
-    {
-      for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi))
-       if (stmt_can_terminate_bb_p (gsi_stmt (bsi)))
-         {
-           return true;
-         }
-    }
+    for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi))
+      if (stmt_can_terminate_bb_p (gsi_stmt (bsi)))
+       return false;
 
   return true;
 }