summaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
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 e05cc4746d7..d68370430c2 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))