+2016-05-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/70986
+ * cfganal.c: Include cfgloop.h.
+ (dfs_find_deadend): Prefer to take edges exiting loops.
+
2016-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/pr70963.c: Require at least power8 at both
#include "cfghooks.h"
#include "timevar.h"
#include "cfganal.h"
+#include "cfgloop.h"
/* Store the data structures necessary for depth-first search. */
struct depth_first_search_ds {
return bb;
}
- bb = EDGE_SUCC (bb, 0)->dest;
+ /* If we are in an analyzed cycle make sure to try exiting it.
+ Note this is a heuristic only and expected to work when loop
+ fixup is needed as well. */
+ if (! bb->loop_father
+ || ! loop_outer (bb->loop_father))
+ bb = EDGE_SUCC (bb, 0)->dest;
+ else
+ {
+ edge_iterator ei;
+ edge e;
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (loop_exit_edge_p (bb->loop_father, e))
+ break;
+ bb = e ? e->dest : EDGE_SUCC (bb, 0)->dest;
+ }
}
gcc_unreachable ();
+2016-05-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/70986
+ * gcc.dg/torture/pr70986-1.c: New testcase.
+ * gcc.dg/torture/pr70986-2.c: Likewise.
+ * gcc.dg/torture/pr70986-3.c: Likewise.
+
2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
PR c/43651