aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2016-01-11 09:19:33 +0000
committerTom de Vries <vries@gcc.gnu.org>2016-01-11 09:19:33 +0000
commit4f6403a8ce2648cb785789f444b5bbaccd415976 (patch)
treee7c44fcd28db1db33aadb1e8f45b1be58a95b673 /gcc/tree-parloops.c
parent4bfede854f6b742fa7472ec7f401681d4bce8a7f (diff)
downloadgcc-4f6403a8ce2648cb785789f444b5bbaccd415976.zip
gcc-4f6403a8ce2648cb785789f444b5bbaccd415976.tar.gz
gcc-4f6403a8ce2648cb785789f444b5bbaccd415976.tar.bz2
Handle case that outer phi res is not used in a phi in gather_scalar_reductions
2016-01-11 Tom de Vries <tom@codesourcery.com> PR tree-optimization/69108 * tree-parloops.c (gather_scalar_reductions): Handle case that outer phi res is not used in a phi. * gcc.dg/autopar/pr69108.c: New test. From-SVN: r232211
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index e05cc47..d683704 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2474,6 +2474,8 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list
gimple *inner_stmt;
bool single_use_p = single_imm_use (res, &use_p, &inner_stmt);
gcc_assert (single_use_p);
+ if (gimple_code (inner_stmt) != GIMPLE_PHI)
+ continue;
gphi *inner_phi = as_a <gphi *> (inner_stmt);
if (simple_iv (loop->inner, loop->inner, PHI_RESULT (inner_phi),
&iv, true))