re PR tree-optimization/80167 (ICE in translate_isl_ast_to_gimple::is_valid_rename at gcc/graphite-isl-ast-to-gimple.c:1139)

2017-03-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80167
	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
	properly.
	(translate_isl_ast_to_gimple::get_rename): Likewise.

	* gcc.dg/graphite/pr80167.c: New testcase.

From-SVN: r246438
This commit is contained in:
Richard Biener 2017-03-24 12:16:43 +00:00 committed by Richard Biener
parent c2e389bf38
commit 76afddf36b
4 changed files with 41 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2017-03-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/80167
* graphite-isl-ast-to-gimple.c
(translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
properly.
(translate_isl_ast_to_gimple::get_rename): Likewise.
2017-03-23 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Change

View File

@ -1123,6 +1123,9 @@ bool translate_isl_ast_to_gimple::
is_valid_rename (tree rename, basic_block def_bb, basic_block use_bb,
phi_node_kind phi_kind, tree old_name, basic_block old_bb) const
{
if (SSA_NAME_IS_DEFAULT_DEF (rename))
return true;
/* The def of the rename must either dominate the uses or come from a
back-edge. Also the def must respect the loop closed ssa form. */
if (!is_loop_closed_ssa_use (use_bb, rename))
@ -1178,6 +1181,7 @@ get_rename (basic_block new_bb, tree old_name, basic_block old_bb,
basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (rename));
if (is_valid_rename (rename, bb, new_bb, phi_kind, old_name, old_bb)
&& (phi_kind == close_phi
|| ! bb
|| flow_bb_inside_loop_p (bb->loop_father, new_bb)))
return rename;
return NULL_TREE;

View File

@ -1,3 +1,8 @@
2017-03-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/80167
* gcc.dg/graphite/pr80167.c: New testcase.
2017-03-24 Tom de Vries <tom@codesourcery.com>
PR testsuite/80092

View File

@ -0,0 +1,24 @@
/* { dg-do compile } */
/* { dg-options "-O2 -floop-nest-optimize" } */
typedef struct
{
short a;
short b;
short c;
} d;
extern d e[];
int f[8];
void
g (d *i)
{
int h = 0;
for (; h < 28; h++)
e[h].a = e[h].b = i[h].a;
h = 0;
for (; h < 8; h++)
f[h] = i[h].b + i[h].c;
h = 0;
for (; h < 8; h++)
f[h] = i[h].b;
}