+2016-11-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/78482
+ * tree-cfgcleanup.c: Include tree-ssa-loop-niter.h.
+ (remove_forwarder_block_with_phi): When merging with a loop
+ header creates a new latch reset number of iteration information
+ of the loop.
+
2016-11-23 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.md (*ashrsi3_extend): Rename to...
+2016-11-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/78482
+ * gcc.dg/torture/pr78482.c: New testcase.
+
2016-11-23 Bin Cheng <bin.cheng@arm.com>
* gcc.dg/fold-cond_expr-1.c: New test.
#include "tree-scalar-evolution.h"
#include "gimple-match.h"
#include "gimple-fold.h"
+#include "tree-ssa-loop-niter.h"
/* The set of blocks in that at least one of the following changes happened:
DEST. */
e = single_succ_edge (split_edge (e));
}
+ else
+ {
+ /* If we merge the forwarder into a loop header verify if we
+ are creating another loop latch edge. If so, reset
+ number of iteration information of the loop. */
+ if (dest->loop_father->header == dest
+ && dominated_by_p (CDI_DOMINATORS, e->src, dest))
+ {
+ dest->loop_father->any_upper_bound = false;
+ dest->loop_father->any_likely_upper_bound = false;
+ free_numbers_of_iterations_estimates_loop (dest->loop_father);
+ }
+ }
s = redirect_edge_and_branch (e, dest);