+2016-08-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/72772
+ * cfgloopmanip.c (create_preheader): Use split_edge if there
+ is a single loop entry, avoiding degenerate PHIs.
+
2016-08-11 Richard Biener <rguenther@suse.de>
* tree-ssa-threadbackward.c (pass_data_thread_jumps): Remove
basic_block
create_preheader (struct loop *loop, int flags)
{
- edge e, fallthru;
+ edge e;
basic_block dummy;
int nentry = 0;
bool irred = false;
mfb_kj_edge = loop_latch_edge (loop);
latch_edge_was_fallthru = (mfb_kj_edge->flags & EDGE_FALLTHRU) != 0;
- fallthru = make_forwarder_block (loop->header, mfb_keep_just, NULL);
- dummy = fallthru->src;
- loop->header = fallthru->dest;
+ if (nentry == 1)
+ dummy = split_edge (single_entry);
+ else
+ {
+ edge fallthru = make_forwarder_block (loop->header, mfb_keep_just, NULL);
+ dummy = fallthru->src;
+ loop->header = fallthru->dest;
+ }
/* Try to be clever in placing the newly created preheader. The idea is to
avoid breaking any "fallthruness" relationship between blocks.
+2016-08-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/72772
+ * gcc.dg/graphite/pr35356-1.c: Adjust.
+ * gcc.dg/tree-ssa/pr59597.c: Likewise.
+
2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.dg/random_7.f90: Take into account that the last seed
*/
-/* { dg-final { scan-tree-dump "if \\\(P_9 >= P_10 \\\+ 1 && P_10 >= 0\\\) \\\{" "graphite" } } */
+/* { dg-final { scan-tree-dump "if \\\(P_8 >= P_9 \\\+ 1 && P_9 >= 0\\\) \\\{" "graphite" } } */
return crc;
}
-/* { dg-final { scan-tree-dump "Cancelling" "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 3 "vrp1" } } */
+/* { dg-final { scan-tree-dump-not "joiner" "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 3 "vrp1" } } */