2012-09-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54458
* tree-ssa-threadupdate.c (thread_through_loop_header): If we
turn the loop into one with multiple latches mark it so.
* gcc.dg/torture/pr54458.c: New testcase.
From-SVN: r190918
+2012-09-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54458
+ * tree-ssa-threadupdate.c (thread_through_loop_header): If we
+ turn the loop into one with multiple latches mark it so.
+
2012-09-04 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/54220
+2012-09-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54458
+ * gcc.dg/torture/pr54458.c: New testcase.
+
2012-09-04 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/arm/neon-vext.c: New test.
--- /dev/null
+/* { dg-do compile } */
+
+unsigned int a, b, c;
+
+void
+foo (unsigned int x)
+{
+ do
+ {
+ if (a == 0 ? 1 : 1 % a)
+ for (; b; b--)
+ lab:;
+ else
+ while (x)
+ ;
+ if (c)
+ goto lab;
+ }
+ while (1);
+}
}
free (bblocks);
+ /* If the new header has multiple latches mark it so. */
+ FOR_EACH_EDGE (e, ei, loop->header->preds)
+ if (e->src->loop_father == loop
+ && e->src != loop->latch)
+ {
+ loop->latch = NULL;
+ loops_state_set (LOOPS_MAY_HAVE_MULTIPLE_LATCHES);
+ }
+
/* Cancel remaining threading requests that would make the
loop a multiple entry loop. */
FOR_EACH_EDGE (e, ei, header->preds)
{
edge e2;
+
if (e->aux == NULL)
continue;