mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/87022 (miscompilation with -ftree-loop-distribution)
PR tree-optimization/87022 * tree-loop-distribution.c (pg_add_dependence_edges): Check all bits in dist vector rather than the first one. gcc/testsuite PR tree-optimization/87022 * gcc.dg/tree-ssa/pr87022.c: New test. From-SVN: r265161
This commit is contained in:
parent
61e189a874
commit
0df7c778ed
|
|
@ -1,3 +1,9 @@
|
||||||
|
2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
|
||||||
|
|
||||||
|
PR tree-optimization/87022
|
||||||
|
* tree-loop-distribution.c (pg_add_dependence_edges): Check all
|
||||||
|
bits in dist vector rather than the first one.
|
||||||
|
|
||||||
2018-10-15 Richard Biener <rguenther@suse.de>
|
2018-10-15 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/87610
|
PR middle-end/87610
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
|
||||||
|
|
||||||
|
PR tree-optimization/87022
|
||||||
|
* gcc.dg/tree-ssa/pr87022.c: New test.
|
||||||
|
|
||||||
2018-10-15 Richard Biener <rguenther@suse.de>
|
2018-10-15 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/87610
|
PR middle-end/87610
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
/* { dg-do run } */
|
||||||
|
/* { dg-options "-O3" } */
|
||||||
|
|
||||||
|
void abort();
|
||||||
|
char a[7];
|
||||||
|
char b[10][7];
|
||||||
|
char r[10][7] = { {0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,0,0,0,0,0},
|
||||||
|
{0,0,1,1,1,1,1},
|
||||||
|
{0,0,1,1,1,1,1},
|
||||||
|
{0,0,1,1,1,1,1}};
|
||||||
|
short c;
|
||||||
|
int d, e, f, g;
|
||||||
|
int main() {
|
||||||
|
for (; d <= 4; d++) {
|
||||||
|
e = 0;
|
||||||
|
for (; e <= 6; e++) {
|
||||||
|
if (a[c])
|
||||||
|
b[e + 3][d + 2] = 1;
|
||||||
|
a[0] = 5;
|
||||||
|
b[e][d + 2] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (; f < 10; f++) {
|
||||||
|
g = 0;
|
||||||
|
for (; g < 7; g++)
|
||||||
|
if (b[f][g] != r[f][g])
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -1921,7 +1921,8 @@ pg_add_dependence_edges (struct graph *rdg, int dir,
|
||||||
if (DDR_NUM_DIST_VECTS (ddr) != 1)
|
if (DDR_NUM_DIST_VECTS (ddr) != 1)
|
||||||
this_dir = 2;
|
this_dir = 2;
|
||||||
/* If the overlap is exact preserve stmt order. */
|
/* If the overlap is exact preserve stmt order. */
|
||||||
else if (lambda_vector_zerop (DDR_DIST_VECT (ddr, 0), 1))
|
else if (lambda_vector_zerop (DDR_DIST_VECT (ddr, 0),
|
||||||
|
DDR_NB_LOOPS (ddr)))
|
||||||
;
|
;
|
||||||
/* Else as the distance vector is lexicographic positive swap
|
/* Else as the distance vector is lexicographic positive swap
|
||||||
the dependence direction. */
|
the dependence direction. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue