diff options
author | Richard Biener <rguenther@suse.de> | 2017-09-26 11:05:42 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-09-26 11:05:42 +0000 |
commit | 621e53705ae51337f78713a868ff3dd41f950422 (patch) | |
tree | a961530067a06df9d1f7d288effaa6de55d0123e /gcc/graphite.c | |
parent | 17ec4b792b8a5c8b454928efe409f62c4e356ffe (diff) | |
download | gcc-621e53705ae51337f78713a868ff3dd41f950422.zip gcc-621e53705ae51337f78713a868ff3dd41f950422.tar.gz gcc-621e53705ae51337f78713a868ff3dd41f950422.tar.bz2 |
re PR tree-optimization/82321 (ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:707)
2017-09-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/82321
* graphite.c (canonicalize_loop_closed_ssa): Properly check
for the def being inside the loop.
* gcc.dg/graphite/pr82321.c: New testcase.
From-SVN: r253199
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r-- | gcc/graphite.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c index 7e6ba50..6713df6 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -326,7 +326,9 @@ canonicalize_loop_closed_ssa (loop_p loop) /* Only add close phi nodes for SSA_NAMEs defined in LOOP. */ if (TREE_CODE (arg) != SSA_NAME - || loop_containing_stmt (SSA_NAME_DEF_STMT (arg)) != loop) + || SSA_NAME_IS_DEFAULT_DEF (arg) + || ! flow_bb_inside_loop_p (loop, + gimple_bb (SSA_NAME_DEF_STMT (arg)))) continue; tree res = copy_ssa_name (arg); |