I am seeing this on powerpc64 both LE and BE. spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/gcc/xgcc -B/home/seurer/gcc/build/gcc-test2/gcc/ /home/seurer/gcc/gcc-test2/libgomp/testsuite/libgomp.graphite/force-parallel-8.c -B/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp/ -B/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp/.libs -I/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp -I/home/seurer/gcc/gcc-test2/libgomp/testsuite/../../include -I/home/seurer/gcc/gcc-test2/libgomp/testsuite/.. -fmessage-length=0 -fno-diagnostics-show-caret -Wno-hsa -fdiagnostics-color=never -fopenmp -ansi -pedantic-errors -O2 -ftree-parallelize-loops=4 -floop-parallelize-all -fdump-tree-parloops-details -fdump-tree-optimized -fno-loop-strip-mine -fno-loop-block -fdump-tree-graphite-all -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp/.libs -lm -o ./force-parallel-8.exe PASS: libgomp.graphite/force-parallel-8.c (test for excess errors) Setting LD_LIBRARY_PATH to .:/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp/.libs:/home/seurer/gcc/build/gcc-test2/gcc:/home/seurer/gcc/build/gcc-test2/gcc/32:.:/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libgomp/.libs:/home/seurer/gcc/build/gcc-test2/gcc:/home/seurer/gcc/build/gcc-test2/gcc/32:/home/seurer/gcc/build/gcc-test2/./gmp/.libs:/home/seurer/gcc/build/gcc-test2/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-test2/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-test2/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-test2/./mpc/src/.libs:/home/seurer/gcc/build/gcc-test2/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-test2/./isl/.libs:/home/seurer/gcc/build/gcc-test2/./prev-isl/.libs:/home/seurer/gcc/install/gcc-6.3.0/lib64 spawn [open ...] PASS: libgomp.graphite/force-parallel-8.c execution test FAIL: libgomp.graphite/force-parallel-8.c scan-tree-dump-times graphite "5 loops carried no dependency" 1 (found 0 times) PASS: libgomp.graphite/force-parallel-8.c scan-tree-dump-times optimized "loopfn.0" 4 PASS: libgomp.graphite/force-parallel-8.c scan-tree-dump-times optimized "loopfn.1" 4 testcase /home/seurer/gcc/gcc-test2/libgomp/testsuite/libgomp.graphite/graphite.exp completed in 2 seconds === libgomp Summary === # of expected passes 4 # of unexpected failures 1
Also seen on hppa-unknown-linux-gnu. Only 3 loops carried no dependency.
Mine.
Confirmed on Intel Silvermont.
So the issue is for (i = 0; i < N; i++) { y[i] = i; for (j = 0; j < N; j++) { if (j > 500) { x[i][j] = i + j + 3; y[j] = i*j + 10; ^^^ here we now verify that we can instantiate i*j + 10 at this point which is (int) {10, +, {0, +, 1}_3}_4 and that fails the graphite_can_represent_scev test because of case POLYNOMIAL_CHREC: /* Check for constant strides. With a non constant stride of 'n' we would have a value of 'iv * n'. Also check that the initial value can represented: for example 'n * m' cannot be represented. */ gcc_assert (loop_in_sese_p (get_loop (cfun, CHREC_VARIABLE (scev)), scop)); if (!evolution_function_right_is_integer_cst (scev) || !graphite_can_represent_init (scev)) return false; given CHREC_RIGHT is {0, +, 1}_3 and not an INTEGER_CST. I think with graphite_can_represent_scev I used the wrong tool (it is supposed to guard what extract_affine handles). Testing a patch.
Fixed.
Author: rguenth Date: Tue Feb 27 14:45:46 2018 New Revision: 258035 URL: https://gcc.gnu.org/viewcvs?rev=258035&root=gcc&view=rev Log: 2018-02-27 Richard Biener <rguenther@suse.de> PR tree-optimization/84466 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p): Adjust last change to less strictly validate use operands. Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-scop-detection.c