Commit d798497e by Richard Biener Committed by Richard Biener

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
parent 41cf3f3e
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> 2017-02-07 Andrew Pinski <apinski@cavium.com>
* config/aarch64/aarch64.md (popcount<mode>2): New pattern. * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
......
...@@ -905,9 +905,19 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop) ...@@ -905,9 +905,19 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop)
sese_l combined = merge_sese (s1, s2); sese_l combined = merge_sese (s1, s2);
if (combined /* Combining adjacent loops may add unrelated loops into the
&& loop_is_valid_in_scop (loop, combined) region so we have to check all sub-loops of the outer loop
&& loop_is_valid_in_scop (loop->next, combined)) 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; s1 = combined;
else else
add_scop (s2); add_scop (s2);
......
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> 2017-02-07 Andrew Pinski <apinski@cavium.com>
* gcc.target/aarch64/popcount.c : New Testcase. * gcc.target/aarch64/popcount.c : New Testcase.
......
/* { 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);
}
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