Reduced Testcase: void w(int x, double *y) { int i, j; double a; double c[32]; for (i = 0; i < x; i++) { for (j = 0; j < x - i; j++) { c[j] = y[i]; } y[i] = a; a += c[0] + y[i]; } } void v(int x, double *y) { w(x, y); } on amd64 with -O2 -floop-nest-optimize test.c: In function 'w': test.c:1:6: internal compiler error: in copy_cond_phi_nodes, at graphite-isl-ast-to-gimple.c:2500 void w(int x, double *y) ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I have the pull request from pr69068 applied.
Forgot this in OP: $ gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-gentoo-linux-musl/gcc-bin/6.1.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-gentoo-linux-musl/6.1.0/lto-wrapper Target: x86_64-gentoo-linux-musl Configured with: /var/tmp/portage/sys-devel/gcc-6.1.0/work/gcc-6.1.0/configure --host=x86_64-gentoo-linux-musl --build=x86_64-gentoo-linux-musl --prefix=/usr --bindir=/usr/x86_64-gentoo-linux-musl/gcc-bin/6.1.0 --includedir=/usr/lib/gcc/x86_64-gentoo-linux-musl/6.1.0/include --datadir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/6.1.0 --mandir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/6.1.0/man --infodir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/6.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-gentoo-linux-musl/6.1.0/include/g++-v6 --with-python-dir=/share/gcc-data/x86_64-gentoo-linux-musl/6.1.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-symvers libat_cv_have_ifunc=no --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 6.1.0 p1.1' --enable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-multilib --with-multilib-list=m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv --enable-lto --with-isl --disable-isl-version-check --disable-libsanitizer --enable-default-pie --enable-default-ssp Thread model: posix gcc version 6.1.0 (Gentoo Hardened 6.1.0 p1.1)
Confirmed, I'm adding also GCC 4.9 branches where it: sorry, unimplemented: Graphite loop optimizations cannot be used
(In reply to Martin Liška from comment #2) > Confirmed, I'm adding also GCC 4.9 branches where it: > sorry, unimplemented: Graphite loop optimizations cannot be used this just means you didn't have the graphite prerequesites and it was disabled at compile-time.
GCC 6.2 is being released, adjusting target milestone.
We run into #1 0x000000000175ce2f in translate_isl_ast_to_gimple::copy_cond_phi_nodes ( this=0x7fffffffd9a0, bb=<basic_block 0x7ffff6891410 (6)>, new_bb=<basic_block 0x7ffff69d1138 (33)>, iv_map=...) at /space/rguenther/src/svn/gcc-6-branch/gcc/graphite-isl-ast-to-gimple.c:2498 2498 gcc_unreachable (); (gdb) l 2493 tree res = gimple_phi_result (phi); 2494 if (virtual_operand_p (res)) 2495 continue; 2496 if (is_gimple_reg (res) && scev_analyzable_p (res, region->region)) 2497 /* Cond phi nodes should not be scev_analyzable_p. */ 2498 gcc_unreachable (); 2499 2500 gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb); 2501 tree new_res = create_new_def_for (res, new_phi, 2502 gimple_phi_result_ptr (new_phi)); the issue went latent on the trunk.
I believe the assertion is simply bogus -- some condition PHIs _can_ be analyzed by SCEV. Removing the assert "fixes" the testcase.
*** Bug 71380 has been marked as a duplicate of this bug. ***
Testcase from the duplicate (ICEs on trunk) int *a; int b, c, d, e, g; char f; void fn1() { for (; c;) { b = 0; for (; b <= 2; b++) { unsigned **h = (unsigned **) &a[b]; *h = (g && (e = d)) != f++; } } } on aarch64 with -Ofast -floop-interchange.
Author: rguenth Date: Fri Nov 11 12:54:25 2016 New Revision: 242069 URL: https://gcc.gnu.org/viewcvs?rev=242069&root=gcc&view=rev Log: 2016-11-11 Richard Biener <rguenther@suse.de> PR tree-optimization/71575 * graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove bogus assert. * gcc.dg/graphite/pr71575-1.c: New testcase. * gcc.dg/graphite/pr71575-2.c: Likewise. Added: trunk/gcc/testsuite/gcc.dg/graphite/pr71575-1.c trunk/gcc/testsuite/gcc.dg/graphite/pr71575-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-isl-ast-to-gimple.c trunk/gcc/testsuite/ChangeLog
Fixed on trunk sofar.
Author: rguenth Date: Fri Dec 9 08:43:50 2016 New Revision: 243475 URL: https://gcc.gnu.org/viewcvs?rev=243475&root=gcc&view=rev Log: 2016-12-09 Richard Biener <rguenther@suse.de> Backport from mainline 2016-11-28 Richard Biener <rguenther@suse.de> PR tree-optimization/78542 * tree-ssa-ccp.c (evaluate_stmt): Only valueize simplification if allowed. * gcc.dg/torture/pr78542.c: New testcase. 2016-11-23 Richard Biener <rguenther@suse.de> PR tree-optimization/78482 * tree-cfgcleanup.c: Include tree-ssa-loop-niter.h. (remove_forwarder_block_with_phi): When merging with a loop header creates a new latch reset number of iteration information of the loop. * gcc.dg/torture/pr78482.c: New testcase. 2016-11-23 Richard Biener <rguenther@suse.de> PR middle-end/71762 * match.pd ((~X & Y) -> X < Y, (X & ~Y) -> Y < X, (~X | Y) -> X <= Y, (X | ~Y) -> Y <= X): Remove. * gcc.dg/torture/pr71762-1.c: New testcase. * gcc.dg/torture/pr71762-2.c: Likewise. * gcc.dg/torture/pr71762-3.c: Likewise. * gcc.dg/tree-ssa/forwprop-28.c: XFAIL. 2016-11-11 Richard Biener <rguenther@suse.de> PR tree-optimization/71575 * graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove bogus assert. * gcc.dg/graphite/pr71575-1.c: New testcase. * gcc.dg/graphite/pr71575-2.c: Likewise. 2016-11-07 Richard Biener <rguenther@suse.de> PR tree-optimization/78224 * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds): Split the fallthru edge in case its successor may have PHIs. * g++.dg/torture/pr78224.C: New testcase. 2016-11-05 David Edelsohn <dje.gcc@gmail.com> Richard Biener <rguenther@suse.de> PR bootstrap/78188 PR c++/71848 * ipa-comdats.c (pass_ipa_comdats::gate): Require HAVE_COMDAT_GROUP. * g++.dg/ipa/pr78188.C: New test. 2016-09-20 Richard Biener <rguenther@suse.de> PR tree-optimization/77646 * tree-ssa-sccvn.c (visit_reference_op_call): Always value-number a VDEF. * gcc.dg/torture/pr77646.c: New testcase. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/ipa/pr78188.C branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr78224.C branches/gcc-6-branch/gcc/testsuite/gcc.dg/graphite/pr71575-1.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/graphite/pr71575-2.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr71762-1.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr71762-2.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr71762-3.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr77646.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr78482.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr78542.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/graphite-isl-ast-to-gimple.c branches/gcc-6-branch/gcc/ipa-comdats.c branches/gcc-6-branch/gcc/match.pd branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c branches/gcc-6-branch/gcc/tree-call-cdce.c branches/gcc-6-branch/gcc/tree-cfgcleanup.c branches/gcc-6-branch/gcc/tree-ssa-ccp.c branches/gcc-6-branch/gcc/tree-ssa-sccvn.c
Fixed.