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
This commit is contained in:
parent
e83bc9d775
commit
49574486e6
@ -1,3 +1,10 @@
|
||||
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
|
||||
{
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
|
19
gcc/testsuite/gcc.dg/graphite/pr84872.c
Normal file
19
gcc/testsuite/gcc.dg/graphite/pr84872.c
Normal file
@ -0,0 +1,19 @@
|
||||
/* 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user