Commit 49574486 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/84872 (ICE in create_preheader, at cfgloopmanip.c:1536)

	PR rtl-optimization/84872
	* cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
	nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
	EDGE_CROSSING edge.

	* gcc.dg/graphite/pr84872.c: New test.

From-SVN: r259182
parent e83bc9d7
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/84872
* cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
EDGE_CROSSING edge.
2018-04-06 Tamar Christina <tamar.christina@arm.com>
* expr.c (copy_blkmode_to_reg): Revert 254862.
......
......@@ -1494,7 +1494,9 @@ create_preheader (struct loop *loop, int flags)
mfb_kj_edge = loop_latch_edge (loop);
latch_edge_was_fallthru = (mfb_kj_edge->flags & EDGE_FALLTHRU) != 0;
if (nentry == 1)
if (nentry == 1
&& ((flags & CP_FALLTHRU_PREHEADERS) == 0
|| (single_entry->flags & EDGE_CROSSING) == 0))
dummy = split_edge (single_entry);
else
{
......
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/84872
* gcc.dg/graphite/pr84872.c: New test.
PR c++/85210
* g++.dg/cpp1z/decomp42.C: New test.
......
/* PR rtl-optimization/84872 */
/* { dg-do compile { target pthread } } */
/* { dg-options "-O1 -floop-parallelize-all -freorder-blocks-and-partition -fschedule-insns2 -fselective-scheduling2 -fsel-sched-pipelining -fno-tree-dce" } */
void
foo (int x)
{
int a[2];
int b, c = 0;
for (b = 0; b < 2; ++b)
a[b] = 0;
for (b = 0; b < 2; ++b)
a[b] = 0;
while (c < 1)
while (x < 1)
++x;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment