From 4b7e0c7668b2893a800289164f2c6b575a3e00da Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 11 Nov 2016 12:54:25 +0000 Subject: re PR tree-optimization/71575 ([graphite] internal compiler error: in copy_cond_phi_nodes, at graphite-isl-ast-to-gimple.c:2500) 2016-11-11 Richard Biener 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. From-SVN: r242069 --- gcc/ChangeLog | 6 ++++++ gcc/graphite-isl-ast-to-gimple.c | 3 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/graphite/pr71575-1.c | 22 ++++++++++++++++++++++ gcc/testsuite/gcc.dg/graphite/pr71575-2.c | 16 ++++++++++++++++ 5 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr71575-1.c create mode 100644 gcc/testsuite/gcc.dg/graphite/pr71575-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ca356d..5c0f897 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2016-11-11 Richard Biener + PR tree-optimization/71575 + * graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove + bogus assert. + +2016-11-11 Richard Biener + PR middle-end/78295 * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn about uninitialized destination arg of BIT_INSERT_EXPR. diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 0eb564a..209eada 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -2505,9 +2505,6 @@ copy_cond_phi_nodes (basic_block bb, basic_block new_bb, vec iv_map) tree res = gimple_phi_result (phi); if (virtual_operand_p (res)) continue; - if (is_gimple_reg (res) && scev_analyzable_p (res, region->region)) - /* Cond phi nodes should not be scev_analyzable_p. */ - gcc_unreachable (); gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb); tree new_res = create_new_def_for (res, new_phi, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index acec6d9..87f09bd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2016-11-11 Richard Biener + PR tree-optimization/71575 + * gcc.dg/graphite/pr71575-1.c: New testcase. + * gcc.dg/graphite/pr71575-2.c: Likewise. + +2016-11-11 Richard Biener + PR middle-end/78295 * gcc.dg/uninit-pr78295.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/graphite/pr71575-1.c b/gcc/testsuite/gcc.dg/graphite/pr71575-1.c new file mode 100644 index 0000000..4a8623e --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr71575-1.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -floop-nest-optimize" } */ + +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); +} diff --git a/gcc/testsuite/gcc.dg/graphite/pr71575-2.c b/gcc/testsuite/gcc.dg/graphite/pr71575-2.c new file mode 100644 index 0000000..24bc957 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr71575-2.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-Ofast -floop-nest-optimize" } */ + +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 = (unsigned *)(__UINTPTR_TYPE__)((g && (e = d)) != f++); + } + } +} -- cgit v1.1