aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r--gcc/tree-vectorizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 0e08652..b63dda3 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -684,7 +684,8 @@ vec_info::new_stmt_vec_info (gimple *stmt)
STMT_VINFO_SLP_VECT_ONLY (res) = false;
STMT_VINFO_VEC_STMTS (res) = vNULL;
- if (gimple_code (stmt) == GIMPLE_PHI
+ if (is_a <loop_vec_info> (this)
+ && gimple_code (stmt) == GIMPLE_PHI
&& is_loop_header_bb_p (gimple_bb (stmt)))
STMT_VINFO_DEF_TYPE (res) = vect_unknown_def_type;
else