Created attachment 43015 [details] reduced testcase I have encountered several miscompilations with graphite, the minimum set of flags seems to be the one reported in this PR. -fno-tree-dominator-opts seems to be always present in the flags. Output: $ x86_64-pc-linux-gnu-gcc -O -fno-tree-dominator-opts -fgraphite-identity testcase.c $ ./a.out Aborted Here, a == 0. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-256069-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-256069-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix gcc version 8.0.0 20180102 (experimental) (GCC)
Confirmed, started with Richi's r255579.
Mine.
Author: rguenth Date: Tue Jan 9 13:35:43 2018 New Revision: 256381 URL: https://gcc.gnu.org/viewcvs?rev=256381&root=gcc&view=rev Log: 2018-01-09 Richard Biener <rguenther@suse.de> PR tree-optimization/83668 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument, move prologue... (canonicalize_loop_form): ... here, renamed from ... (canonicalize_loop_closed_ssa_form): ... this and amended to swap successor edges for loop exit blocks to make us use the RPO order we need for initial schedule generation. * gcc.dg/graphite/pr83668.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/graphite/pr83668.c Modified: trunk/gcc/ChangeLog trunk/gcc/graphite.c trunk/gcc/testsuite/ChangeLog
Fixed.