PR middle-end/53695
* tracer.c (tracer): Fixup loop structure.
* cfgloopmanip.c (force_single_succ_latches): Add assert.
(fix_loop_structure): Re-compute loop latches and disambiguate
loops with multiple latches if required.
* gcc.dg/torture/pr53695.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192943
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-10-29 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53695
+ * tracer.c (tracer): Fixup loop structure.
+ * cfgloopmanip.c (force_single_succ_latches): Add assert.
+ (fix_loop_structure): Re-compute loop latches and disambiguate
+ loops with multiple latches if required.
+
2012-10-29 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_decompose_address): Use simplify_gen_subreg
continue;
e = find_edge (loop->latch, loop->header);
+ gcc_checking_assert (e != NULL);
split_edge (e);
}
}
}
+ /* Then re-compute the single latch if there is one. */
+ FOR_EACH_LOOP (li, loop, 0)
+ {
+ edge_iterator ei;
+ edge e, latch = NULL;
+ FOR_EACH_EDGE (e, ei, loop->header->preds)
+ if (dominated_by_p (CDI_DOMINATORS, e->src, loop->header))
+ {
+ if (!latch)
+ latch = e;
+ else
+ {
+ latch = NULL;
+ break;
+ }
+ }
+ if (latch
+ && latch->src->loop_father == loop)
+ loop->latch = latch->src;
+ else
+ loop->latch = NULL;
+ }
+
+ if (!loops_state_satisfies_p (LOOPS_MAY_HAVE_MULTIPLE_LATCHES))
+ disambiguate_loops_with_multiple_latches ();
+
if (loops_state_satisfies_p (LOOPS_HAVE_PREHEADERS))
create_preheaders (CP_SIMPLE_PREHEADERS);
+2012-10-29 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53695
+ * gcc.dg/torture/pr53695.c: New testcase.
+
2012-10-28 Jan Hubicka <jh@suse.cz>
* gcc.dg/ipa/inlinehint-3.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-ftracer" } */
+
+void
+foo (const void **p)
+{
+ void *labs[] = { &&l1, &&l2, &&l3 };
+l1:
+ goto *p++;
+l2:
+ goto *p;
+l3:
+ ;
+}
/* Trace formation is done on the fly inside tail_duplicate */
changed = tail_duplicate ();
if (changed)
- free_dominance_info (CDI_DOMINATORS);
+ {
+ free_dominance_info (CDI_DOMINATORS);
+ calculate_dominance_info (CDI_DOMINATORS);
+ if (current_loops)
+ fix_loop_structure (NULL);
+ }
if (dump_file)
brief_dump_cfg (dump_file, dump_flags);