mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/71824 (ICE when compiling libiberty with Graphite loop optimizations)
2017-02-08 Richard Biener <rguenther@suse.de> PR tree-optimization/71824 * graphite-scop-detection.c (scop_detection::build_scop_breadth): Check all loops contained in the merged region. * gcc.dg/graphite/pr71824-2.c: New testcase. From-SVN: r245270
This commit is contained in:
parent
41cf3f3eb9
commit
d798497efc
|
|
@ -1,3 +1,9 @@
|
|||
2017-02-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/71824
|
||||
* graphite-scop-detection.c (scop_detection::build_scop_breadth):
|
||||
Check all loops contained in the merged region.
|
||||
|
||||
2017-02-07 Andrew Pinski <apinski@cavium.com>
|
||||
|
||||
* config/aarch64/aarch64.md (popcount<mode>2): New pattern.
|
||||
|
|
|
|||
|
|
@ -905,9 +905,19 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop)
|
|||
|
||||
sese_l combined = merge_sese (s1, s2);
|
||||
|
||||
if (combined
|
||||
&& loop_is_valid_in_scop (loop, combined)
|
||||
&& loop_is_valid_in_scop (loop->next, combined))
|
||||
/* Combining adjacent loops may add unrelated loops into the
|
||||
region so we have to check all sub-loops of the outer loop
|
||||
that are in the combined region. */
|
||||
if (combined)
|
||||
for (l = loop_outer (loop)->inner; l; l = l->next)
|
||||
if (bb_in_sese_p (l->header, combined)
|
||||
&& ! loop_is_valid_in_scop (l, combined))
|
||||
{
|
||||
combined = invalid_sese;
|
||||
break;
|
||||
}
|
||||
|
||||
if (combined)
|
||||
s1 = combined;
|
||||
else
|
||||
add_scop (s2);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2017-02-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/71824
|
||||
* gcc.dg/graphite/pr71824-2.c: New testcase.
|
||||
|
||||
2017-02-07 Andrew Pinski <apinski@cavium.com>
|
||||
|
||||
* gcc.target/aarch64/popcount.c : New Testcase.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -floop-nest-optimize" } */
|
||||
|
||||
typedef struct { float x1; } bx;
|
||||
typedef struct {
|
||||
int w;
|
||||
short o;
|
||||
} T2P;
|
||||
T2P a;
|
||||
int b;
|
||||
void fn2();
|
||||
void fn3(bx*,short);
|
||||
void fn1() {
|
||||
unsigned i = 0;
|
||||
int c;
|
||||
bx *d;
|
||||
bx **h;
|
||||
if (b == 0) {
|
||||
fn2();
|
||||
return;
|
||||
}
|
||||
for (; c; c++)
|
||||
for (; i < 100; i++) {
|
||||
d = h[i];
|
||||
d->x1 = a.w;
|
||||
}
|
||||
for (; i < 100; i++) {
|
||||
d = h[i];
|
||||
d->x1 = a.w;
|
||||
}
|
||||
if (a.o)
|
||||
for (; b;)
|
||||
fn3(d, a.o);
|
||||
}
|
||||
Loading…
Reference in New Issue